-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move android release template out of build-tools. (#728)
* Move android release template out of build-tools.
- Loading branch information
1 parent
dd3ba9a
commit 60ee8be
Showing
2 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
125 changes: 125 additions & 0 deletions
125
eng/pipelines/templates/stages/archetype-android-release.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
parameters: | ||
Artifacts: [] | ||
ArtifactName: 'not-specified' | ||
|
||
stages: | ||
# The signing stage is responsible for submitting binaries to ESRP for our official signing | ||
# where appropriate and also meeting any other signing requirements for particular artifacts, | ||
# in this case we do GPG signing in order to publish to Maven Central. At the moment signing | ||
# is protected by an approval check but this may be removed in the future. | ||
- stage: Signing | ||
dependsOn: ${{parameters.DependsOn}} | ||
jobs: | ||
- deployment: SignPackage | ||
environment: esrp | ||
timeoutInMinutes: 20 | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
|
||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- checkout: azure-sdk-build-tools | ||
path: azure-sdk-build-tools | ||
|
||
- download: current | ||
artifact: ${{parameters.ArtifactName}} | ||
timeoutInMinutes: 5 | ||
|
||
- template: /tools/java-esrp-signing/java-esrp-signing.yml@azure-sdk-build-tools | ||
parameters: | ||
Artifacts: ${{parameters.Artifacts}} | ||
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}} | ||
|
||
- publish: $(Pipeline.Workspace)/${{parameters.ArtifactName}} | ||
artifact: ${{parameters.ArtifactName}}-signed | ||
displayName: 'Store signed packages in ${{parameters.ArtifactName}}-signed artifact' | ||
timeoutInMinutes: 5 | ||
|
||
# We generate two interdepdent stages for each artifact listed in the ci.yml file, creates the release | ||
# in GitHub. The Release stage publishes to Maven Central. Both stages require approval since they | ||
# effectively burn the version number. For testing of packages prior to burning the version number - | ||
# the Validation step below publishes a package to a "burner" feed which is cleaned up after the | ||
# pipeline completes. | ||
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}: | ||
- ${{ each artifact in parameters.Artifacts }}: | ||
- stage: Release_${{artifact.safeName}} | ||
displayName: 'Release: ${{artifact.name}}' | ||
dependsOn: Signing | ||
condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-android-pr')) | ||
jobs: | ||
- deployment: TagRepository | ||
displayName: "Create release tag" | ||
condition: ne(variables['Skip.TagRepository'], 'true') | ||
environment: github | ||
timeoutInMinutes: 5 | ||
dependsOn: | ||
- ${{ if eq(parameters.VerifyVersions, 'true')}}: | ||
- VerifyReleaseVersion | ||
|
||
pool: | ||
vmImage: vs2017-win2016 | ||
|
||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- checkout: azure-sdk-build-tools | ||
path: azure-sdk-build-tools | ||
- pwsh: | | ||
$(Pipeline.Workspace)/azure-sdk-build-tools/scripts/create-tags-and-git-release.ps1 -artifactLocation $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.safeName}} -packageRepository Maven -releaseSha $(Build.SourceVersion) -repoId $(Build.Repository.Name) | ||
displayName: 'Verify Package Tags and Create Git Releases' | ||
timeoutInMinutes: 5 | ||
workingDirectory: $(Pipeline.Workspace) | ||
env: | ||
GH_TOKEN: $(azuresdk-github-pat) | ||
- ${{if ne(artifact.options.skipPublishPackage, 'true')}}: | ||
- deployment: PublishPackage | ||
displayName: "Publish to Maven Central" | ||
condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true')) | ||
environment: maven | ||
dependsOn: TagRepository | ||
|
||
pool: | ||
vmImage: vs2017-win2016 | ||
|
||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- checkout: azure-sdk-build-tools | ||
path: azure-sdk-build-tools | ||
- template: /tools/gpg/gpg.yml@azure-sdk-build-tools | ||
- template: /tools/java-publishing/java-publishing.yml@azure-sdk-build-tools | ||
parameters: | ||
ArtifactID: ${{artifact.name}} | ||
GroupID: ${{artifact.groupId}} | ||
ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed | ||
Target: MavenCentral | ||
|
||
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}: | ||
- deployment: PublishDocs | ||
displayName: Publish Docs to GitHubIO Blob Storage | ||
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) | ||
environment: githubio | ||
dependsOn: PublishPackage | ||
|
||
pool: | ||
vmImage: windows-2019 | ||
|
||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- checkout: azure-sdk-build-tools | ||
path: azure-sdk-build-tools | ||
- template: /tools/generic-blob-upload/publish-blobs.yml@azure-sdk-build-tools | ||
parameters: | ||
FolderForUpload: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.safeName}}' | ||
BlobSASKey: '$(azure-sdk-docs-prod-sas)' | ||
BlobName: '$(azure-sdk-docs-prod-blob-name)' | ||
TargetLanguage: 'android' | ||
# we override the regular script path because we have cloned the build tools repo as a separate artifact. | ||
ScriptPath: '$(Pipeline.Workspace)/azure-sdk-build-tools/scripts/copy-docs-to-blobstorage.ps1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters