Skip to content

Instantly share code, notes, and snippets.

@gambtho
Last active August 22, 2019 19:03
Show Gist options
  • Save gambtho/cd8917c36a58f87a654ec45c1bf4a34b to your computer and use it in GitHub Desktop.
Save gambtho/cd8917c36a58f87a654ec45c1bf4a34b to your computer and use it in GitHub Desktop.
simple example of a multi-stage pipeline
name: cust-App-NP-$(Date:yyyyMMdd).$(Rev:.r)
trigger:
batch: true
branches:
include:
- master
variables:
- group: cust_non_prod_shared_terraform_config
stages:
- stage: dev
displayName: Development
variables:
- group: cust_dev_terraform_config
jobs:
- job: upload
pool: cust-pool
steps:
- template: templates/upload.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
- deployment: install
environment: cust-dev
pool: cust-pool
dependsOn: upload
strategy:
runOnce:
deploy:
steps:
- template: templates/install.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
- stage: test
displayName: Test
variables:
- group: cust_test1_terraform_config
jobs:
- job: upload
pool: cust-pool
steps:
- template: templates/upload.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
- deployment: install
environment: cust-test1
pool: cust-pool
dependsOn: upload
strategy:
runOnce:
deploy:
steps:
- template: templates/install.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
- stage: stg
displayName: Staging
variables:
- group: cust_stg1_terraform_config
jobs:
- job: upload
pool: cust-pool
steps:
- template: templates/upload.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
- deployment: install
environment: cust-stg1
pool: cust-pool
dependsOn: upload
strategy:
runOnce:
deploy:
steps:
- template: templates/install.yml
parameters:
env: $(env)
azure_sub: $(azure_sub)
name: $(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment