Skip to content

Instantly share code, notes, and snippets.

@MartinLuksik
Created February 6, 2023 10:20
Show Gist options
  • Save MartinLuksik/733a9b40807f88c19dd26b20a7bf5cbf to your computer and use it in GitHub Desktop.
Save MartinLuksik/733a9b40807f88c19dd26b20a7bf5cbf to your computer and use it in GitHub Desktop.
[AzureDevOps] #AzureDevOps #yaml #build
trigger: none
variables:
- group: library-variable-group #name of the var group
stages:
- stage:
displayName: retrieve
jobs:
- deployment: retrieve
displayName: retrieve
pool: pool-name
environment: env-name
strategy:
runOnce:
deploy:
steps:
- task: Bash@3
displayName: 'GET_PASSWORD'
inputs:
targetType: 'inline'
script: echo $MYSECRET > ./tmp.txt
env:
MYSECRET: $(VAR_GROUP_SECRET_NAME)
- task: PublishPipelineArtifact@1
inputs:
targetPath: './tmp.txt'
artifact: 'VAR_GROUP_SECRET_VALUE'
publishLocation: 'pipeline'
- task: Bash@3
displayName: 'cleanup'
inputs:
targetType: 'inline'
script: rm ./tmp.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment