forked from MicrosoftDocs/mslearn-tailspin-spacegame-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-deploy.yml
37 lines (33 loc) · 1.04 KB
/
azure-pipelines-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Sample of multi-stage CD pipeline using YAML template and Terraform plugin for deployment
resources:
pipelines:
- pipeline: 'build'
source: 'azure-pipelines'
trigger:
branches:
- develop
variables:
appName: 'SpaceGameWeb'
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: 'tfplandev'
displayName: Terraform plan for dev environment
condition: eq(variables['resources.pipeline.build.sourceBranch'], 'refs/heads/develop')
jobs:
- template: ./azure-pipelines-deploy-plan-template.yml
parameters:
job_name: tf_plan_to_dev
display_name: Terraform plan $(appName) to dev environment
build_branch: 'develop'
variable_group_name: dev_configuration
- stage: 'tfapplydev'
displayName: Apply terraform to dev
dependsOn: tfplandev
jobs:
- template: ./azure-pipelines-deploy-apply-template.yml
parameters:
job_name: apply_to_dev
display_name: Deploy $(appName) to dev environment
build_branch: 'develop'
variable_group_name: dev_configuration