-
Notifications
You must be signed in to change notification settings - Fork 382
Move to v4 publishing. #16639
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
base: main
Are you sure you want to change the base?
Move to v4 publishing. #16639
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ parameters: | |
| default: 3 | ||
| values: | ||
| - 3 | ||
| - 4 | ||
|
|
||
| - name: BARBuildId | ||
| displayName: BAR Build Id | ||
|
|
@@ -130,16 +131,30 @@ stages: | |
| PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} | ||
| is1ESPipeline: ${{ parameters.is1ESPipeline }} | ||
|
|
||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Package Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: PackageArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if ne(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Package Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: PackageArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if eq(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: Download Pipeline Artifacts (V4) | ||
| inputs: | ||
| itemPattern: '*/packages/**/*.nupkg' | ||
| targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| - task: CopyFiles@2 | ||
| displayName: Flatten packages to PackageArtifacts | ||
| inputs: | ||
| SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| Contents: '**/*.nupkg' | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts' | ||
| flattenFolders: true | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: Validate | ||
|
|
@@ -173,16 +188,30 @@ stages: | |
| PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} | ||
| is1ESPipeline: ${{ parameters.is1ESPipeline }} | ||
|
|
||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Package Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: PackageArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if ne(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Package Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: PackageArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if eq(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: Download Pipeline Artifacts (V4) | ||
| inputs: | ||
| itemPattern: '*/packages/**/*.nupkg' | ||
| targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| - task: CopyFiles@2 | ||
| displayName: Flatten packages to PackageArtifacts | ||
| inputs: | ||
| SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| Contents: '**/*.nupkg' | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/PackageArtifacts' | ||
| flattenFolders: true | ||
|
|
||
| # This is necessary whenever we want to publish/restore to an AzDO private feed | ||
| # Since sdk-task.ps1 tries to restore packages we need to do this authentication here | ||
|
|
@@ -234,16 +263,30 @@ stages: | |
| PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} | ||
| is1ESPipeline: ${{ parameters.is1ESPipeline }} | ||
|
|
||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Blob Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: BlobArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if ne(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadBuildArtifacts@0 | ||
| displayName: Download Blob Artifacts | ||
| inputs: | ||
| buildType: specific | ||
| buildVersionToDownload: specific | ||
| project: $(AzDOProjectName) | ||
| pipeline: $(AzDOPipelineId) | ||
| buildId: $(AzDOBuildId) | ||
| artifactName: BlobArtifacts | ||
| checkDownloadedFiles: true | ||
| - ${{ if eq(parameters.publishingInfraVersion, 4) }}: | ||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: Download Pipeline Artifacts (V4) | ||
| inputs: | ||
| itemPattern: '*/assets/**' | ||
| targetPath: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| - task: CopyFiles@2 | ||
| displayName: Flatten assets to BlobArtifacts | ||
| inputs: | ||
| SourceFolder: '$(Build.ArtifactStagingDirectory)/PipelineArtifactsDownload' | ||
| Contents: '**/*' | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/BlobArtifacts' | ||
| flattenFolders: true | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: Validate | ||
|
|
@@ -317,7 +360,7 @@ stages: | |
| scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 | ||
| arguments: > | ||
| -BuildId $(BARBuildId) | ||
| -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} | ||
| -PublishingInfraVersion 3 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are we hardcoding 3 here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because publishing is agnostic to the publishing infra version (e.g. VMR build passes 3). It just works transparently for v3/v4.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to remove the parameter in another PR |
||
| -AzdoToken '$(System.AccessToken)' | ||
| -WaitPublishingFinish true | ||
| -RequireDefaultChannels ${{ parameters.requireDefaultChannels }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use if/else in yaml