forked from MUnique/OpenMU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release-docker-images-pipeline.yml
132 lines (127 loc) · 3.61 KB
/
release-docker-images-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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Build and Push Docker Container
trigger:
branches:
include:
- master
paths:
exclude:
- docs/*
- tests/*
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
- task: PowerShell@2
inputs:
filePath: 'set-projectVersion.ps1'
- bash: |
#!/bin/sh
echo 'tag is $TAG'
if (curl --silent -f -lSL https://hub.docker.com/v2/repositories/munique/openmu/tags/$TAG > /dev/null) then
echo '##vso[task.setvariable variable=tagExists]true'
else
echo '##vso[task.setvariable variable=tagExists]false'
fi
env:
TAG: $(projectVersion)
- task: Docker@2
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'login'
- task: Docker@2
displayName: "Build and Push All-In-One Image (openmu)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Startup/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push AdminPanel Image (openmu-admin)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/AdminPanel.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-admin'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push ChatServer Image"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/ChatServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-chat'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push ConnectServer Image (openmu-connect)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/ConnectServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-connect'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push FriendServer Image (openmu-friend)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/FriendServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-friend'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push GameServer Image (openmu-game)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/GameServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-game'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push GuildServer Image (openmu-guild)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/GuildServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-guild'
tags: |
$(projectVersion)
latest
- task: Docker@2
displayName: "Build and Push LoginServer Image (openmu-login)"
condition: eq(variables.tagExists, 'false')
inputs:
containerRegistry: 'munique docker hub'
command: 'buildAndPush'
Dockerfile: 'src/Dapr/LoginServer.Host/Dockerfile'
buildContext: 'src'
repository: 'munique/openmu-login'
tags: |
$(projectVersion)
latest