Skip to content

Commit

Permalink
Merge 6748ebd into c543505
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr authored Oct 14, 2022
2 parents c543505 + 6748ebd commit a858c00
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ continuation_indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
4 changes: 2 additions & 2 deletions eng/pipelines/partner-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ jobs:
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactDirectory: $(SignedArtifact)
Target: MavenCentral
Target: EsrpRelease
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
ShouldPublish: ${{ parameters.ShouldPublish }}
StageOnly: ${{ parameters.StageOnly }}
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: packages-mavencentral-$(System.JobAttempt)
ArtifactPath: $(SignedArtifact)
ArtifactPath: $(SignedArtifact)
87 changes: 42 additions & 45 deletions eng/pipelines/templates/stages/archetype-java-release-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,55 +197,52 @@ stages:
- Name: Azure/azure-sdk-for-java
Commitish: $(Build.SourceVersion)
WorkingDirectory: $(Pipeline.Workspace)/azure-sdk-for-java
- pwsh: |
$artifactPaths = @('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Where-Object -Not "skipPublishPackage" | ForEach-Object { "$($_.groupId)/$($_.name)/**" })
$filterPaths = $artifactPaths + 'PackageInfos/**'
Write-Host "##vso[task.setvariable variable=filterPaths;]$($filterPaths -join '%0D%0A')" # URL encoded \r\n to for multiline variable
- download: current
displayName: 'Download Artifacts'
artifact: ${{parameters.ArtifactName}}-signed
patterns: $(filterPaths)
- template: tools/gpg/gpg.yml@azure-sdk-build-tools
- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishPackage, 'true')}}:
- ${{ if eq(parameters.UseEsrpRelease, 'true') }}:
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactID: ${{artifact.name}}
GroupID: ${{artifact.groupId}}
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
OutputDirectory: $(Pipeline.Workspace)/EsrpPackages
Target: EsrpRelease
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-${{artifact.name}}-esrp-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/EsrpPackages
- ${{ else }}:
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactID: ${{artifact.name}}
GroupID: ${{artifact.groupId}}
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
Target: MavenCentral
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- 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.
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactID: ${{artifact.name}}
GroupID: ${{artifact.groupId}}
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
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
- 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 eq(parameters.UseEsrpRelease, 'true') }}:
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
OutputDirectory: $(Pipeline.Workspace)/EsrpPackages
Target: EsrpRelease
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-esrp-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/EsrpPackages
- ${{ else }}:
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
Target: MavenCentral
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-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.
- template: /eng/pipelines/templates/steps/java-publishing.yml
parameters:
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
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
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactName: ${{parameters.ArtifactName}}-javadevfeed-$(System.JobAttempt)
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed

- deployment: UpdatePackageVersion
displayName: "Update Package Version"
Expand Down
3 changes: 1 addition & 2 deletions eng/pipelines/templates/steps/java-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ steps:
-GPGExecutablePath ${{ parameters.GPGExecutablePath }}
-InformationAction Continue
- ${{if and(eq(parameters.ShouldPublish, 'true'), ne(parameters.StageOnly, 'true'))}}:
- task: EsrpRelease@1
- task: EsrpRelease@2
displayName: 'Publish to ESRP'
inputs:
ConnectedServiceName: 'ESRP Release Service'
Expand All @@ -110,4 +110,3 @@ steps:
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
MainPublisher: 'ESRPRELPACMANTEST'
DomainTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'

0 comments on commit a858c00

Please sign in to comment.