This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
439 lines (406 loc) · 16.6 KB
/
.gitlab-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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
image: docker:latest
variables:
DEBIAN_RELEASE: "bookworm"
DEBIAN_BASE_IMAGE: "bookworm-slim"
TORADEX_INTERNAL_DOCKERHUB_CACHE: "artifactory-horw.int.toradex.com/dockerhub-proxy-horw/"
# container version
DEBIAN_CROSS_TOOLCHAINS_MAJOR: "3"
DEBIAN_CROSS_TOOLCHAINS_MINOR: "0"
DEBIAN_CROSS_TOOLCHAINS_PATCH: "6"
DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR: "3"
DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR: "0"
DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH: "4"
# This should be set by docker image already, just to be sure...
DOCKER_HOST: tcp://docker:2375
# Use overlayfs driver for better performance
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
GITLAB_DOCKERREGISTRY_SUFFIX: ${CI_COMMIT_REF_SLUG}-${CI_PIPELINE_ID}
GITLAB_DOCKERREGISTRY_SUFFIX_LATEST: ${CI_COMMIT_REF_SLUG}-latest
services:
- name: docker:dind
stages:
- lint
- repository-tagging
- build-base
- build-ssh
- build-samples-bridge
- deploy
# Docker image builds
#
# Build the Docker images specified in DOCKERFILE_FOLDER/IMAGE_NAME and push
# it to Gitlab's internal Docker registry
.docker-build:
script:
- echo "[DEBUG] Enviroment variables:" && env
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker info
- if test -n "${BASE_NAME}"; then docker pull ${CI_REGISTRY_IMAGE}/${BASE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX} && docker tag ${CI_REGISTRY_IMAGE}/${BASE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX} torizon/${BASE_NAME}:${MAJOR} ; fi || exit 1
# Try to download latest image for cache, but don't fail if it does not exist
- docker pull ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST} || true
- docker pull ${CI_REGISTRY}/rd/torizon-core-containers/debian-cross-toolchains/${IMAGE_NAME}:${DEBIAN_RELEASE}-latest || true
- export DATE=$(date +%Y%m%d)
- docker build --build-arg ARCH_ARG=${ARCH_ARG}
--build-arg DOCKER_REGISTRY=${DOCKER_REGISTRY}
--build-arg IMAGE_TAG=${MAJOR}
--build-arg ACCEPT_FSL_EULA=${ACCEPT_FSL_EULA}
--build-arg CROSS_COMPILE_ARG=${CROSS_COMPILE_ARG}
--build-arg DEBIAN_BASE_IMAGE=${DEBIAN_BASE_IMAGE}
--build-arg USE_TORADEX_SNAPSHOT=${USE_TORADEX_SNAPSHOT:-1}
--cache-from ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST}
${DOCKER_NO_CACHE:+--no-cache}
--label container.name=${IMAGE_NAME}
--label container.version="${MAJOR}.${MINOR}.${PATCH}-${DATE}"
--label git.branch=${CI_COMMIT_BRANCH}
--label git.hash=${CI_COMMIT_SHA}
--label pipeline.id=${CI_PIPELINE_ID}
-f ${DOCKERFILE_FOLDER}Dockerfile
-t ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX}
-t ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST}
${DOCKERFILE_FOLDER}
- docker push ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX}
- docker push ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST}
docker-build-armhf-toolchain:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: armhf
CROSS_COMPILE_ARG: arm-linux-gnueabihf
IMAGE_NAME: debian-cross-toolchain-armhf
DOCKERFILE_FOLDER: "base/"
stage: build-base
docker-build-arm-toolchain:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: armhf
CROSS_COMPILE_ARG: arm-linux-gnueabihf
IMAGE_NAME: debian-cross-toolchain-arm
DOCKERFILE_FOLDER: "base/"
stage: build-base
docker-build-armhf-toolchain-ssh:
extends: .docker-build
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: armhf
BASE_NAME: debian-cross-toolchain-armhf
IMAGE_NAME: debian-cross-toolchain-ssh-armhf
DOCKERFILE_FOLDER: "ssh/"
stage: build-ssh
docker-build-arm64-toolchain:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: arm64
CROSS_COMPILE_ARG: aarch64-linux-gnu
IMAGE_NAME: debian-cross-toolchain-arm64
DOCKERFILE_FOLDER: "base/"
stage: build-base
docker-build-arm64-toolchain-vivante:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: arm64
CROSS_COMPILE_ARG: aarch64-linux-gnu
IMAGE_NAME: debian-cross-toolchain-arm64-vivante
DOCKERFILE_FOLDER: "base-vivante/"
ACCEPT_FSL_EULA: 1
stage: build-base
docker-build-arm64-toolchain-ssh:
extends: .docker-build
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: arm64
BASE_NAME: debian-cross-toolchain-arm64
IMAGE_NAME: debian-cross-toolchain-ssh-arm64
DOCKERFILE_FOLDER: "ssh/"
stage: build-ssh
docker-build-x86-toolchain:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: amd64
CROSS_COMPILE_ARG: x86_64-linux-gnu
IMAGE_NAME: debian-cross-toolchain-amd64
DOCKERFILE_FOLDER: "base/"
USE_TORADEX_SNAPSHOT: 0
stage: build-base
docker-build-x86-toolchain-ssh:
extends: .docker-build
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DEBIAN_BASE_IMAGE="${DEBIAN_BASE_IMAGE}"
variables:
ARCH_ARG: amd64
BASE_NAME: debian-cross-toolchain-amd64
IMAGE_NAME: debian-cross-toolchain-ssh-amd64
DOCKERFILE_FOLDER: "ssh/"
USE_TORADEX_SNAPSHOT: 0
stage: build-ssh
docker-build-rcv-toolchain:
extends: .docker-build
needs: []
before_script:
- export DOCKER_REGISTRY="${TORADEX_INTERNAL_DOCKERHUB_CACHE}"
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
variables:
ARCH_ARG: riscv64
CROSS_COMPILE_ARG: riscv64-linux-gnu
IMAGE_NAME: debian-cross-toolchain-riscv64
DOCKERFILE_FOLDER: "base/"
USE_TORADEX_SNAPSHOT: 0
DEBIAN_BASE_IMAGE: "sid-slim"
stage: build-base
docker-build-rcv-toolchain-ssh:
extends: .docker-build
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
variables:
ARCH_ARG: riscv64
BASE_NAME: debian-cross-toolchain-riscv64
IMAGE_NAME: debian-cross-toolchain-ssh-riscv64
DOCKERFILE_FOLDER: "ssh/"
USE_TORADEX_SNAPSHOT: 0
DEBIAN_BASE_IMAGE: "sid-slim"
stage: build-ssh
lint_dockerfile:
stage: lint
image: hadolint/hadolint:latest-debian
script:
# Some rules cannot be applied in our specific cases.
# However, since we don't want to completely ignore these rules,
# we are changing the following rules to have the level "info":
#- DL3008 (pin versions in apt-get install)
#- DL3020 (use COPY instead of ADD for files and folders)
#- DL4006 (set the SHELL option -o pipefail before RUN with a pipe in it)
#- SC2046 (quote this to prevent word splitting)
- hadolint */Dockerfile --failure-threshold warning --info DL3008 --info DL3020 --info DL4006 --info SC2046
# Make sure to create access token in "Settings/Access Tokens" section with "write_repository" scope selected.
# Then in "Settings/CI/CD/" section add a variable with key "GIT_TOKEN" and a value of the access token. Also mask the variable.
tag:
stage: repository-tagging
needs: []
before_script:
- if [ -z ${GIT_TOKEN} ]; then echo "Missing variable GIT_TOKEN." && exit 1; fi
- TAGS="debian-cross-toolchains-${DEBIAN_CROSS_TOOLCHAINS_MAJOR}.${DEBIAN_CROSS_TOOLCHAINS_MINOR}.${DEBIAN_CROSS_TOOLCHAINS_PATCH}
debian-cross-toolchains-ssh-${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}.${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}.${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
script:
- apk update && apk add git
- git remote set-url origin https://gitlab-ci-token:${GIT_TOKEN}@${CI_REPOSITORY_URL#*@}
- for TAG in ${TAGS};
do
if git ls-remote --tags origin | grep ${TAG} > /dev/null; then
echo "${TAG} tag already exists.";
else
echo "Tagging repository with ${TAG} tag.";
git tag --delete ${TAG} > /dev/null 2>&1 || true;
git tag ${TAG};
git push -o ci.skip origin ${TAG};
fi
done
# Bridge
#
# Trigger pipelines on other projects, for example, the Torizon samples
build-torizon-samples:
when: manual
stage: build-samples-bridge
trigger:
project: rd/torizon-core/samples
branch: ${DEBIAN_RELEASE}
strategy: depend
# Don't fail a pipeline on the current project if the samples pipeline fail
allow_failure: true
# Enable experimental features in Docker client (experimental feature are needed for manifest)
.do_docker_experimental: &do_docker_experimental
- mkdir -p $HOME/.docker
- "echo -e '{\n \"experimental\": \"enabled\"\n}' | tee $HOME/.docker/config.json"
- docker version
# Docker deploy jobs
#
# Make sure DOCKER_HUB_USER/DOCKER_HUB_TOKEN is properly set in the project
# specific Gitlab CI settings.
.docker-deploy:
when: manual
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX}
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_TOKEN
- for tag in ${DOCKER_TAGS_CHECK}; do
set -e;
EXIT_CODE=0;
docker manifest inspect ${DOCKER_HUB_REPOSITORY}/${IMAGE_NAME}:${tag}-${DEBIAN_RELEASE} > /dev/null || EXIT_CODE=$?;
if [ $EXIT_CODE -eq 0 ]; then
echo "Image with ${tag} tag already exists in ${DOCKER_HUB_REPOSITORY}." && exit 1;
else
echo "Pushing new ${tag} for ${IMAGE_NAME} to ${DOCKER_HUB_REPOSITORY}.";
for tag in ${DOCKER_TAGS} ${DOCKER_TAGS_CHECK}; do
docker tag ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX} ${DOCKER_HUB_REPOSITORY}/${IMAGE_NAME}:${tag}-${DEBIAN_RELEASE};
docker push ${DOCKER_HUB_REPOSITORY}/${IMAGE_NAME}:${tag}-${DEBIAN_RELEASE};
done
fi
done
docker-deploy-armhf-toolchain:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-armhf
stage: deploy
docker-deploy-arm-toolchain:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-arm
stage: deploy
docker-deploy-armhf-toolchain-ssh:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-ssh-armhf
stage: deploy
docker-deploy-arm64-toolchain:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-arm64
stage: deploy
docker-deploy-arm64-toolchain-vivante:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-arm64-vivante
stage: deploy
docker-deploy-arm64-toolchain-ssh:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-ssh-arm64
stage: deploy
docker-deploy-x86-toolchain:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-amd64
stage: deploy
docker-deploy-x86-toolchain-ssh:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-ssh-amd64
stage: deploy
docker-deploy-rcv-toolchain:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-riscv64
stage: deploy
docker-deploy-rcv-toolchain-ssh:
extends: .docker-deploy
before_script:
- export MAJOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MAJOR}"
- export MINOR="${DEBIAN_CROSS_TOOLCHAINS_SSH_MINOR}"
- export PATCH="${DEBIAN_CROSS_TOOLCHAINS_SSH_PATCH}"
- export DATE=$(date +%Y%m%d)
- export DOCKER_TAGS_CHECK="${MAJOR}.${MINOR}.${PATCH} ${MAJOR}.${MINOR}.${PATCH}-${DATE}"
- export DOCKER_TAGS="${MAJOR} ${MAJOR}.${MINOR}"
variables:
IMAGE_NAME: debian-cross-toolchain-ssh-riscv64
stage: deploy