-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreditcoin-staking-dashboard-ci.yml
73 lines (66 loc) · 1.9 KB
/
creditcoin-staking-dashboard-ci.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
trigger:
batch: true
branches:
include:
- main
- dev
- release/*
- feature/*
- project/*
pr:
- master
- dev
pool:
vmImage: ubuntu-latest
jobs:
- job: 'BuildAndPush'
steps:
- pwsh: |
$branchtag=""
echo "$(Build.SourceBranch)"
if ("$(Build.SourceBranch)" -match ".*release/.*"){
$branchtag=$( "$(Build.SourceBranch)" -replace "refs/heads/", "")
$branchtag=$( $branchtag -replace "/", "--")
}
echo "branchtag: $branchtag"
echo "##vso[task.setvariable variable=releaseTag;]$branchtag"
- task: Docker@2
displayName: 'Build Test Docker Image'
inputs:
containerRegistry: 'substrate-relayer'
repository: 'gluwa/cc3-staking-dashboard'
command: 'build'
Dockerfile: '**/Dockerfile'
arguments: '--build-arg="TARGET_NETWORK=test"'
tags: |
test-$(Build.BuildId)
- task: Docker@2
displayName: 'Build Docker Image'
inputs:
containerRegistry: 'substrate-relayer'
repository: 'gluwa/cc3-staking-dashboard'
command: 'build'
Dockerfile: '**/Dockerfile'
arguments: '--build-arg="TARGET_NETWORK=prod"'
tags: |
$(Build.BuildId)
latest
$(releaseTag)
- task: Docker@2
displayName: 'Build Test Docker Image'
inputs:
containerRegistry: 'substrate-relayer'
repository: 'gluwa/cc3-staking-dashboard'
command: 'push'
tags: |
test-$(Build.BuildId)
- task: Docker@2
displayName: 'Build Docker Image'
inputs:
containerRegistry: 'substrate-relayer'
repository: 'gluwa/cc3-staking-dashboard'
command: 'push'
tags: |
$(Build.BuildId)
latest
$(releaseTag)