diff --git a/azure-pipelines/vs-insertion-experimental.yml b/azure-pipelines/vs-insertion-experimental.yml index 215e88c5ecc..05018f82c08 100644 --- a/azure-pipelines/vs-insertion-experimental.yml +++ b/azure-pipelines/vs-insertion-experimental.yml @@ -24,20 +24,8 @@ parameters: displayName: 'Insertion Target Branch (select for manual insertion)' values: - main - - rel/d18.6 - - rel/d18.5 - - rel/d18.4 - - rel/d18.3 - - rel/d18.0 - - rel/d17.14 - - rel/d17.13 - - rel/d17.12 - - rel/d17.11 - - rel/d17.8 - - rel/d17.6 - - rel/d17.3 - - rel/d17.0 - - rel/d16.11 + - rel/insiders + - rel/stable variables: - name: TeamName @@ -120,28 +108,13 @@ extends: inputs: targetType: inline script: | - # Extract VS version from branch name if it follows exp/vsXX.Y-somename pattern - $fullBranch = "$(resources.pipeline.MSBuildExpPerf.sourceBranch)" $parameterTargetBranch = "${{ parameters.TargetBranch }}" - $detectedTarget = "main" # Default target branch - - # Try to match the pattern with regex - if ($fullBranch -match "exp/vs(\d+)\.(\d+).*") { - $major = $matches[1] - $minor = $matches[2] - $targetBranch = "rel/d$major.$minor" - Write-Host "Detected version pattern in branch: $major.$minor" - Write-Host "Setting target branch to $targetBranch" - $detectedTarget = $targetBranch - } else { - Write-Host "No version pattern detected in branch, using default target: main" - } # Determine which target branch to use based on build reason $finalTargetBranch = $parameterTargetBranch if ("$(Build.Reason)" -eq "ResourceTrigger" -or "$(Build.Reason)" -eq "PipelineCompletedTrigger") { - Write-Host "Build was triggered automatically, using detected target branch: $detectedTarget" - $finalTargetBranch = $detectedTarget + Write-Host "Build was triggered automatically, using default target branch: main" + $finalTargetBranch = "main" } else { Write-Host "Build was triggered manually, using parameter target branch: $parameterTargetBranch" } diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml index f40e263cea8..e0af55a65f8 100644 --- a/azure-pipelines/vs-insertion.yml +++ b/azure-pipelines/vs-insertion.yml @@ -28,7 +28,7 @@ resources: branch: main # for daily main scheduled insertion trigger: branches: - include: # trigger as a followup to servicing CI + include: # trigger as a followup to CI on servicing branches - vs* repositories: - repository: 1ESPipelineTemplates @@ -44,20 +44,8 @@ parameters: values: - auto - main - - rel/d18.6 - - rel/d18.5 - - rel/d18.4 - - rel/d18.3 - - rel/d18.0 - - rel/d17.14 - - rel/d17.13 - - rel/d17.12 - - rel/d17.11 - - rel/d17.10 - - rel/d17.8 - - rel/d17.6 - - rel/d17.3 - - rel/d17.0 + - rel/insiders + - rel/stable - name: DropRetentionDays default: 183 type: number @@ -69,44 +57,11 @@ parameters: variables: # `auto` should work every time and selecting a branch in parameters is likely to fail due to incompatible versions in MSBuild and VS - - name: AutoInsertTargetBranch - ${{ if eq(variables['Build.SourceBranchName'], 'vs18.6') }}: - value: 'rel/d18.6' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs18.5') }}: - value: 'rel/d18.5' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs18.4') }}: - value: 'rel/d18.4' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs18.3') }}: - value: 'rel/d18.3' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs18.0') }}: - value: 'rel/d18.0' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.14') }}: - value: 'rel/d17.14' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.13') }}: - value: 'rel/d17.13' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.12') }}: - value: 'rel/d17.12' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.11') }}: - value: 'rel/d17.11' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.8') }}: - value: 'rel/d17.8' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.6') }}: - value: 'rel/d17.6' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.3') }}: - value: 'rel/d17.3' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.0') }}: - value: 'rel/d17.0' - ${{ elseif eq(variables['Build.SourceBranchName'], 'main') }}: - value: 'main' - ${{ elseif eq(variables['Build.SourceBranchName'], 'vs17.15') }}: - value: 'main' - ${{ else }}: - value: '' - name: InsertTargetBranch ${{ if not(eq(parameters.TargetBranch, 'auto')) }}: value: ${{ parameters.TargetBranch }} ${{ else }}: - value: $(AutoInsertTargetBranch) + value: 'main' - name: TeamName value: msbuild - name: TeamEmail @@ -227,37 +182,10 @@ extends: $MicrosoftNETStringToolsPackageVersion = $packageFile.BaseName.TrimStart("Microsoft.NET.StringTools") Write-Host "Setting MicrosoftNETStringToolsPackageVersion to '$MicrosoftNETStringToolsPackageVersion'" Write-Host "##vso[task.setvariable variable=MicrosoftNETStringToolsPackageVersion]$($MicrosoftNETStringToolsPackageVersion)" - $props = @( - "VS.ExternalAPIs.MSBuild=$MSBuild_ExtApisPackageVersion", - "Microsoft.Build=$MicrosoftNETStringToolsPackageVersion", - "Microsoft.Build.Framework=$MicrosoftNETStringToolsPackageVersion", - "Microsoft.Build.Tasks.Core=$MicrosoftNETStringToolsPackageVersion", - "Microsoft.Build.Utilities.Core=$MicrosoftNETStringToolsPackageVersion", - "Microsoft.NET.StringTools=$MicrosoftNETStringToolsPackageVersion" - ) - # servicing branches until 17.12 also include Microsoft.Build.Engine and Microsoft.Build.Conversion.Core - if ("$(InsertTargetBranch)" -in @("rel/d17.0", "rel/d17.3", "rel/d17.6", "rel/d17.8", "rel/d17.10", "rel/d17.11", "rel/d17.12")) - { - $props += @( - "Microsoft.Build.Conversion.Core=$MicrosoftNETStringToolsPackageVersion", - "Microsoft.Build.Engine=$MicrosoftNETStringToolsPackageVersion" - ) - } - $propsValue = $props -join ";" - - # For 18.0+, don't update PackageReferences so that VS packages like VSSDK - # can choose their own versioning and don't always depend on a super fresh MSBuild - if ("$(InsertTargetBranch)" -in @("rel/d17.10", "rel/d17.12", "rel/d17.14")) - { - Write-Host "Setting InsertPackagePropsValues to '$propsValue'" - Write-Host "##vso[task.setvariable variable=InsertPackagePropsValues]$($propsValue)" - } - else - { - Write-Host "Unsetting InsertPackagePropsValues" - Write-Host "##vso[task.setvariable variable=InsertPackagePropsValues]" - } + # InsertPackagePropsValues was needed for old servicing branches (rel/d17.x) but is not used for main + Write-Host "Unsetting InsertPackagePropsValues" + Write-Host "##vso[task.setvariable variable=InsertPackagePropsValues]" # autocomplete main $autocomplete = "false"