-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment-pipeline.yml
79 lines (70 loc) · 2.24 KB
/
deployment-pipeline.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
trigger:
branches:
include:
- dev
- test
- master
pr: none
variables:
arcName: 'coronai'
MOHarcName: 'IDFDocker'
AzureContainerRegistry: 'AzureContainerRegistry'
MOHContainerRegistry: 'MOHContainerRegistry'
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isTest: $[eq(variables['Build.SourceBranch'], 'refs/heads/test')]
isDev: $[eq(variables['Build.SourceBranch'], 'refs/heads/dev')]
stages:
- stage:
displayName: Build Stage
jobs:
- job: BuildJob
displayName: Build Job
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.18'
displayName: 'Installing Node.js'
- bash: |
npm install
displayName: 'Installing the dependencies'
continueOnError: 'false'
- bash: |
npm run build
displayName: 'Compiling the service'
continueOnError: 'false'
- task: Docker@2
condition: eq(variables.isDev,true)
continueOnError: 'false'
displayName: Build and push dev service image to CoronaI Team container registry
inputs:
command: buildAndPush
dockerfile: '**/Dockerfile'
repository: '$(arcName)'
azureSubscriptionEndpoint: '$(AzureContainerRegistry)'
containerRegistry: '$(AzureContainerRegistry)'
tags: |
investigation-delete-service-dev
- task: Docker@2
condition: eq(variables.isTest,true)
continueOnError: 'false'
displayName: Build and push test service image to MOH container registry
inputs:
command: buildAndPush
dockerfile: '**/Dockerfile'
repository: '$(MOHarcName)'
azureSubscriptionEndpoint: '$(MOHContainerRegistry)'
containerRegistry: '$(MOHContainerRegistry)'
tags: |
investigation-delete-service-test
- task: Docker@2
condition: eq(variables.isMaster,true)
continueOnError: 'false'
displayName: Build and push master service image to MOH container registry
inputs:
command: buildAndPush
dockerfile: '**/Dockerfile'
repository: '$(MOHarcName)'
azureSubscriptionEndpoint: '$(MOHContainerRegistry)'
containerRegistry: '$(MOHContainerRegistry)'
tags: |
investigation-delete-service-master