File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -31,22 +31,39 @@ build:device-plugin:
31
31
- VERSION="${CI_COMMIT_TAG}"
32
32
33
33
- REPOSITORY="${IMAGE}-${ARCH}"
34
- - IMAGE_NAME=$([[ "${NO_OS_SUFFIX}" == true ]] && echo "${ REPOSITORY}:${VERSION}" || echo "${REPOSITORY}:${VERSION} -${OS}")
34
+ - IMAGE_NAME="${REPOSITORY}:${VERSION}-${OS}"
35
35
36
36
- docker pull "${IMAGE_NAME}" && echo "Tag already exists, aborting so that we don't rewrite it" && false
37
-
38
37
- docker build -t "${IMAGE_NAME}" -f "docker/${OS}/${ARCH}/Dockerfile" .
39
38
40
39
- docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"
41
40
- docker push "${IMAGE_NAME}"
42
41
42
+ - >
43
+ if [[ "${TAG_AND_PUSH_VERSION}" == true ]]; then
44
+ docker tag "${IMAGE_NAME}" "${REPOSITORY}:${VERSION}"
45
+ docker push "${REPOSITORY}:${VERSION}"
46
+ fi
47
+ - >
48
+ if [[ "${TAG_AND_PUSH_LATEST}" == true ]]; then
49
+ docker tag "${IMAGE_NAME}" "${REPOSITORY}:latest"
50
+ docker push "${REPOSITORY}:latest"
51
+ fi
52
+ - >
53
+ if [[ "${TAG_AND_PUSH_BETA}" == true ]]; then
54
+ docker tag "${IMAGE_NAME}" "${REPOSITORY}:beta"
55
+ docker push "${REPOSITORY}:beta"
56
+ fi
57
+
43
58
amd64:centos7 :
44
59
<< : *release_definition
45
60
46
61
amd64:ubuntu16.04 :
47
62
<< : *release_definition
48
63
variables :
49
- NO_OS_SUFFIX : " true"
64
+ TAG_AND_PUSH_VERSION : " true"
65
+ TAG_AND_PUSH_LATEST : " true"
66
+ TAG_AND_PUSH_BETA : " true"
50
67
51
68
ppc64le:centos7 :
52
69
<< : *release_definition
You can’t perform that action at this time.
0 commit comments