Skip to content

Commit

Permalink
Use publish-artifact template and unique artifact names for gpg artif…
Browse files Browse the repository at this point in the history
…acts (#24059)
  • Loading branch information
hallipr authored Sep 13, 2021
1 parent de01351 commit 295c3ba
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
7 changes: 4 additions & 3 deletions eng/pipelines/partner-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ steps:
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
ShouldPublish: ${{ parameters.ShouldPublish }}
StageOnly: ${{ parameters.StageOnly }}
- publish: $(Artifacts)
artifact: packages-mavencentral
displayName: 'Store gpg signed packages in packages-mavencentral artifact'
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: packages-mavencentral-$(System.JobAttempt)
ArtifactPath: $(Artifacts)
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ stages:
Target: MavenCentral
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
artifact: ${{parameters.ArtifactName}}-mavencentral
displayName: 'Store gpg signed packages in ${{parameters.ArtifactName}}-mavencentral artifact'
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-${{artifact.name}}-mavencentral-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
# After publishing to Maven, publish to the azure-sdk-for-java feed. The reason for
# this is that the azure-sdk-for-java feed will have the package available immediately
# whereas Maven can take several hours for the package to become available.
Expand All @@ -117,7 +118,8 @@ stages:
RepositoryUrl: https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1
Target: JavaDevFeed
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
artifact: ${{parameters.ArtifactName}}-javadevfeed
displayName: 'Store gpg signed packages in ${{parameters.ArtifactName}}-javadevfeed artifact'
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-${{artifact.name}}-javadevfeed-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
21 changes: 12 additions & 9 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ stages:
Target: MavenCentral
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
artifact: ${{parameters.ArtifactName}}-mavencentral
displayName: 'Store gpg signed packages in ${{parameters.ArtifactName}}-mavencentral artifact'
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-${{artifact.name}}-mavencentral-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
# After publishing to Maven, publish to the azure-sdk-for-java feed. The reason for
# this is that the azure-sdk-for-java feed will have the package available immediately
# whereas Maven can take several hours for the package to become available.
Expand All @@ -190,9 +191,10 @@ stages:
Target: JavaDevFeed
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
artifact: ${{parameters.ArtifactName}}-javadevfeed
displayName: 'Store gpg signed packages in ${{parameters.ArtifactName}}-javadevfeed artifact'
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-${{artifact.name}}-javadevfeed-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed

- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- deployment: PublicDocsMs
Expand Down Expand Up @@ -366,6 +368,7 @@ stages:
RepositoryUrl: $(RepositoryUrl)
Target: JavaDevFeed
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
artifact: ${{parameters.ArtifactName}}-javadevfeed
displayName: 'Store gpg signed packages in ${{parameters.ArtifactName}}-javadevfeed artifact'
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: integration-${{parameters.ArtifactName}}-${{artifact.name}}-javadevfeed-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed

0 comments on commit 295c3ba

Please sign in to comment.