Skip to content

Instantly share code, notes, and snippets.

@mitchdenny
Created August 19, 2019 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchdenny/f5c825c5ee13fce6a8c593424ba83c8a to your computer and use it in GitHub Desktop.
Save mitchdenny/f5c825c5ee13fce6a8c593424ba83c8a to your computer and use it in GitHub Desktop.
parameters:
Artifacts: []
ArtifactName: 'not-specified'
stages:
- stage: Signing
dependsOn: ${{parameters.DependsOn}}
jobs:
- deployment: SignPackage
environment: wherewesign
timeoutInMinutes: 20
pool:
vmImage: ubuntu-16.04
strategy:
runOnce:
deploy:
steps:
- checkout: none
- script: |
echo Pretend I am signing
# 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.
- ${{ each artifact in parameters.Artifacts }}:
- stage: Release_${{artifact.safeName}}
displayName: 'Release: ${{artifact.name}}'
dependsOn: Signing
condition: eq(variables['Build.Reason'], 'Manual')
jobs:
- deployment: TagRepository
environment: github
timeoutInMinutes: 5
pool:
vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
steps:
- checkout: none
- script: |
echo Pretend we are tagging.
- deployment: PublishPackage
environment: maven
timeoutInMinutes: 5
dependsOn: TagRepository
pool:
vmImage: ubuntu-16.04
strategy:
runOnce:
deploy:
steps:
- checkout: none
- script: |
echo Pretend I am publishing the package
- stage: Validation
dependsOn: Signing
jobs:
- job: PublishPackage
pool:
vmImage: ubuntu-16.04
steps:
- checkout: none
- script: |
echo Code that publishes to Azure Artifacts
- stage: Cleanup
condition: always()
dependsOn:
- ${{ each artifact in parameters.Artifacts }}:
- Release_${{artifact.safeName}}
- Validation
jobs:
- job: DeleteFeed
pool:
vmImage: ubuntu-16.04
steps:
- checkout: none
- script: |
echo Delete a burner feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment