Skip to content

Commit 081f10e

Browse files
committed
Merge branch 'beta-latest' into 'master'
Add latest and beta tags See merge request nvidia/kubernetes/device-plugin!7
2 parents abf14f1 + e836007 commit 081f10e

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.gitlab-ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,39 @@ build:device-plugin:
3131
- VERSION="${CI_COMMIT_TAG}"
3232

3333
- REPOSITORY="${IMAGE}-${ARCH}"
34-
- IMAGE_NAME=$([[ "${NO_OS_SUFFIX}" == true ]] && echo "${REPOSITORY}:${VERSION}" || echo "${REPOSITORY}:${VERSION}-${OS}")
34+
- IMAGE_NAME="${REPOSITORY}:${VERSION}-${OS}"
3535

3636
- docker pull "${IMAGE_NAME}" && echo "Tag already exists, aborting so that we don't rewrite it" && false
37-
3837
- docker build -t "${IMAGE_NAME}" -f "docker/${OS}/${ARCH}/Dockerfile" .
3938

4039
- docker login -u "${REGISTRY_USER}" -p "${REGISTRY_TOKEN}"
4140
- docker push "${IMAGE_NAME}"
4241

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+
4358
amd64:centos7:
4459
<<: *release_definition
4560

4661
amd64:ubuntu16.04:
4762
<<: *release_definition
4863
variables:
49-
NO_OS_SUFFIX: "true"
64+
TAG_AND_PUSH_VERSION: "true"
65+
TAG_AND_PUSH_LATEST: "true"
66+
TAG_AND_PUSH_BETA: "true"
5067

5168
ppc64le:centos7:
5269
<<: *release_definition

0 commit comments

Comments
 (0)