summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Roulot <groulot@gitlab.com>2018-08-09 14:59:16 +0000
committerGilbert Roulot <groulot@gitlab.com>2018-08-09 14:59:16 +0000
commit30b1735e79e2efaea5d35f26da476513c2ec1671 (patch)
treec0d59b46c4e1729fd43a97b94b55da9b0b74228e
parenta7173a17dbb48b121c6eb0b93ad8a1033654c171 (diff)
Make pushes to master build the next release's docker image.
https://gitlab.com/gitlab-org/security-products/release/issues/7
-rw-r--r--.gitlab-ci.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f19fc2b..cbe34ca 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,7 +28,7 @@ test:
only:
- branches
-release-latest:
+release-latest-and-next-version:
stage: release
image: docker:stable
services:
@@ -45,6 +45,9 @@ release-latest:
- docker tag "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" "$CI_REGISTRY_IMAGE:latest"
- echo "Pushing to GitLab Container Registry..."
- docker push "$CI_REGISTRY_IMAGE:latest"
+ - docker tag "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" "$CI_REGISTRY_IMAGE:$(cat VERSION)"
+ - echo "Pushing to GitLab Container Registry..."
+ - docker push "$CI_REGISTRY_IMAGE:$(cat VERSION)"
only:
- master