Created
February 6, 2023 10:20
-
-
Save MartinLuksik/733a9b40807f88c19dd26b20a7bf5cbf to your computer and use it in GitHub Desktop.
[AzureDevOps] #AzureDevOps #yaml #build
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
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