-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.yaml
176 lines (152 loc) · 3.91 KB
/
build.yaml
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
init:
buildPath: /tmp/dbsync/
Version: $Cat(../Version)
target:
URL: ssh://localhost/
credentials: localhost
pipeline:
transient:
clean:
action: storage:remove
assets:
- URL: ${buildPath}/transient
- URL: ${buildPath}/final
mkdir:
action: exec:run
target: $target
commands:
- mkdir -p ${buildPath}/transient/usr/lib/
- mkdir -p ${buildPath}/transient/usr/local/bin/
- mkdir -p ${buildPath}/final/sync
- mkdir -p ${buildPath}/final/transfer
- cd $Pwd(..)
- tar cvzf dbsync.tar.gz *
- cp dbsync.tar.gz ${buildPath}/transient/
- cd ${buildPath}/transient/
- tar xvzf dbsync.tar.gz
- cp dep/dep.tar.gz .
- cp docker/transient/Dockerfile .
- cp docker/final/transfer/Dockerfile ../final/transfer/Dockerfile
- cp docker/final/sync/Dockerfile ../final/sync/
- cd $Pwd(..)
- rm dbsync.tar.gz
prepareBuild:
action: storage:copy
expand: true
source:
URL: ${buildPath}/transient/docker/transient/Dockerfile
dest:
URL: ${buildPath}/transient/Dockerfile
build:
action: docker:build
platform: linux/amd64
path: ${buildPath}/transient/
#nocache: true
expand: true
tag:
image: dbsync_transient
version: ${Version}
extract:
start:
action: docker:run
platform: linux/amd64
image: dbsync_transient:${Version}
name: dbsync_transient
copy:
action: docker:copy
assets:
'dbsync_transient:/dbsync.tar.gz': ${buildPath}/final/sync/dbsync.tar.gz
'dbsync_transient:/dbtransfer.tar.gz': ${buildPath}/final/transfer/dbtransfer.tar.gz
cleaup:
action: docker:remove
name: dbsync_transient
compact:
sync:
build:
action: docker:build
platform: linux/amd64
path: ${buildPath}/final/sync
nocache: true
tag:
image: dbsync
version: ${Version}
transfer:
build:
action: docker:build
platform: linux/amd64
path: ${buildPath}/final/transfer
nocache: true
tag:
image: dbtransfer
version: ${Version}
deploy:
auth:
action: docker:login
repository: index.docker.io/viant
credentials: dockerHubEndly
#
# action: docker:login
# repository: us.gcr.io/tech-ops-poc
# credentials: gcr
sync:
tagBuildVersion:
action: docker:tag
sourceTag:
image: dbsync
version: ${Version}
targetTag:
image: dbsync
username: viant
version: ${Version}
tagLatestVersion:
action: docker:tag
sourceTag:
image: dbsync
version: ${Version}
targetTag:
image: dbsync
username: viant
version: latest
pushVersion:
action: docker:push
tag:
image: dbsync
username: viant
version: ${Version}
pushLatestVersion:
action: docker:push
tag:
image: dbsync
username: viant
version: latest
transfer:
tagBuildVersion:
action: docker:tag
sourceTag:
image: dbtransfer
version: ${Version}
targetTag:
image: dbtransfer
username: viant
version: ${Version}
tagLatestVersion:
action: docker:tag
sourceTag:
image: dbtransfer
version: ${Version}
targetTag:
image: dbtransfer
username: viant
version: latest
pushVersion:
action: docker:push
tag:
image: dbtransfer
username: viant
version: ${Version}
pushLatestVersion:
action: docker:push
tag:
image: dbtransfer
username: viant
version: latest