Skip to content

Commit

Permalink
Merge branch 'beta-latest' into 'master'
Browse files Browse the repository at this point in the history
Add latest and beta tags

See merge request nvidia/kubernetes/device-plugin!7
  • Loading branch information
klueska committed Oct 15, 2019
2 parents abf14f1 + e836007 commit 081f10e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,39 @@ build:device-plugin:
- VERSION="${CI_COMMIT_TAG}"

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

- docker pull "${IMAGE_NAME}" && echo "Tag already exists, aborting so that we don't rewrite it" && false

- docker build -t "${IMAGE_NAME}" -f "docker/${OS}/${ARCH}/Dockerfile" .

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

- >
if [[ "${TAG_AND_PUSH_VERSION}" == true ]]; then
docker tag "${IMAGE_NAME}" "${REPOSITORY}:${VERSION}"
docker push "${REPOSITORY}:${VERSION}"
fi
- >
if [[ "${TAG_AND_PUSH_LATEST}" == true ]]; then
docker tag "${IMAGE_NAME}" "${REPOSITORY}:latest"
docker push "${REPOSITORY}:latest"
fi
- >
if [[ "${TAG_AND_PUSH_BETA}" == true ]]; then
docker tag "${IMAGE_NAME}" "${REPOSITORY}:beta"
docker push "${REPOSITORY}:beta"
fi
amd64:centos7:
<<: *release_definition

amd64:ubuntu16.04:
<<: *release_definition
variables:
NO_OS_SUFFIX: "true"
TAG_AND_PUSH_VERSION: "true"
TAG_AND_PUSH_LATEST: "true"
TAG_AND_PUSH_BETA: "true"

ppc64le:centos7:
<<: *release_definition
Expand Down

0 comments on commit 081f10e

Please sign in to comment.