Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vs17.8] disallow inserting pkgs twice in VS insertion #11152

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions azure-pipelines/vs-insertion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# To achieve insertion automation, this pipeline definition yml has to be on servicing branches and main.


# Runs in 3 modes:
# Runs in 3 modes:
# 1. daily main insertion from latest main CI.
# - can be disabled in the UI by adding a custom schedule for any branch.
# - can be disabled in the UI by adding a custom schedule for any branch.
# 2. trigger insert as a followup to a servicing CI run.
# - can be disabled in the UI by adding a custom CI trigger.
# 3. manual insertion - select manually the TargetBranch and inserted CI run.
Expand Down Expand Up @@ -56,6 +56,10 @@ parameters:
default: 183
type: number
displayName: 'Drop Retention Days (do not set to < 90)'
- name: SkipUploadingPackages
JanProvaznik marked this conversation as resolved.
Show resolved Hide resolved
default: false
type: boolean
displayName: 'Skip uploading packages (set to true if inserting the same version multiple times)'

variables:
# `auto` should work every time and selecting a branch in parameters is likely to fail due to incompatible versions in MSBuild and VS
Expand Down Expand Up @@ -95,8 +99,8 @@ variables:
value: $(resources.pipeline.MSBuild.sourceCommit)
- name: ArtifactPackagesPath
value: $(Build.ArtifactStagingDirectory)/PackageArtifacts
- name: MSBuildPackagePattern

- name: MSBuildPackagePattern
value: '$(ArtifactPackagesPath)/Microsoft.Build.*.nupkg'
- name: StringToolsPackagePattern
value: '$(ArtifactPackagesPath)/Microsoft.NET.StringTools*.nupkg'
Expand Down Expand Up @@ -200,7 +204,7 @@ 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",
Expand All @@ -223,24 +227,26 @@ extends:
Write-Host "##vso[task.setvariable variable=InsertPackagePropsValues]$($propsValue)"
- task: 1ES.PublishNuGet@1
displayName: 'Push MSBuild CoreXT packages'
condition: ${{ eq(parameters.SkipUploadingPackages, false) }}
inputs:
packageParentPath: '$(Build.ArtifactStagingDirectory)'
packagesToPush: $(MSBuildPackagePattern);$(StringToolsPackagePattern);$(ExternalAPIsPackagePattern)
nuGetFeedType: internal
publishVstsFeed: VS
allowPackageConflicts: true
allowPackageConflicts: false
- template: /azure-pipelines/WIFtoPATauth.yml@self
parameters:
wifServiceConnectionName: azure-public/vside package push
deadPATServiceConnectionId: 42175e93-c771-4a4f-a132-3cca78f44b3b
- task: 1ES.PublishNuGet@1
condition: ${{ eq(parameters.SkipUploadingPackages, false) }}
displayName: 'Push MSBuild packages to VSSDK'
inputs:
packageParentPath: '$(Build.ArtifactStagingDirectory)'
packagesToPush: $(MSBuildPackagePattern);$(StringToolsPackagePattern)
nuGetFeedType: external
publishFeedCredentials: azure-public/vssdk
allowPackageConflicts: true
allowPackageConflicts: false
- task: PowerShell@2
name: PrintTargetBranch
inputs:
Expand All @@ -264,4 +270,4 @@ extends:
CustomScriptExecutionCommand: $(InsertCustomScriptExecutionCommand)
AutoCompletePR: true
AutoCompleteMergeStrategy: Squash
InsertionBuildPolicy: Request Perf DDRITs
InsertionBuildPolicy: Request Perf DDRITs