Created
April 16, 2021 13:42
-
-
Save pietergheysens/f83a36a6ecb2cca4df037b6b0be2584c to your computer and use it in GitHub Desktop.
Yaml pipeline with variable template
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
pool: | |
vmImage: ubuntu-latest | |
resources: | |
repositories: | |
- repository: sharedconfig | |
type: git | |
name: SharedConfiguration | |
variables: | |
- name: mainvar1 | |
value: valuemainvar1 | |
- template: pipeline-variables.yml@sharedconfig | |
stages: | |
- stage: DEV | |
jobs: | |
- job: A1 | |
pool: | |
vmImage: ubuntu-latest | |
variables: | |
- template: configuration-dev.yml | |
- group: Secrets-DEV | |
steps: | |
- script: echo $(organisationUrl) | |
displayName: Output common variable | |
- script: echo $(var1) | |
displayName: Output variables DEV | |
- script: echo $(AdminUserPassword) | |
displayName: Output secure variables PRD | |
- stage: PRD | |
jobs: | |
- job: B1 | |
pool: | |
vmImage: ubuntu-latest | |
variables: | |
- template: configuration-prd.yml | |
- group: Secrets-PRD | |
steps: | |
- script: echo $(organisationUrl) | |
displayName: Output common variable | |
- script: echo $(var1) | |
displayName: Output variables PRD | |
- script: echo $(AdminUserPassword) | |
displayName: Output secure variables PRD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment