-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (53 loc) · 1.54 KB
/
azure-pipelines.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# add branches to trigger builds here
trigger:
- dev
- master
pool:
name: default
variables:
isProd: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isDev: $[eq(variables['Build.SourceBranch'], 'refs/heads/dev')]
jobs:
- job: ImageDoesNotExist
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: '! docker manifest inspect pgc-docker.artifactory.umn.edu/pgc-info-pages:$IMAGE_TAG'
env:
IMAGE_TAG: $(Build.SourceVersion)
- job: BuildAndPushImage
dependsOn:
- ImageDoesNotExist
workspace:
clean: all
steps:
- template: az-pipeline-templates/build.yml
- job: DeployTestClusterDev
dependsOn:
- ImageDoesNotExist
- BuildAndPushImage
condition: and(or(succeeded('BuildAndPushImage'), failed('ImageDoesNotExist')), eq(variables.isDev, 'true'))
workspace:
clean: all
steps:
- template: az-pipeline-templates/deploy.yml
parameters:
env: dev
overlay: dev
namespace: info-pages-dev
k8sSvcConnection: "k8s-prd info-pages-dev"
- job: DeployTestClusterPrd
dependsOn:
- ImageDoesNotExist
- BuildAndPushImage
condition: and(or(succeeded('BuildAndPushImage'), failed('ImageDoesNotExist')), eq(variables.isDev, 'false'))
workspace:
clean: all
steps:
- template: az-pipeline-templates/deploy.yml
parameters:
env: prd
overlay: prd
namespace: info-pages-prd
k8sSvcConnection: "k8s-prd info-pages-prd"