Commit 19169d83 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

.gitlab-ci.yml to deploy release images

parent d4e07540
Pipeline #135697 passed with stages
in 9 minutes and 4 seconds
......@@ -11,6 +11,8 @@ variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
DOCKER_IMAGE_TAGGED: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
DOCKER_IMAGE_LATEST: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:latest
DOCKER_RELEASE_IMAGE_TAGGED: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
DOCKER_RELEASE_IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
stages:
- build
......@@ -55,9 +57,6 @@ test:
package:
stage: package
script:
- ls
- ls build
- ls build/libs
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build -t $DOCKER_IMAGE_TAGGED .
- docker push $DOCKER_IMAGE_TAGGED
......@@ -65,6 +64,21 @@ package:
- docker push $DOCKER_IMAGE_LATEST
dependencies:
- build
except:
- master
release-image:
stage: package
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build -t $DOCKER_RELEASE_IMAGE_TAGGED .
- docker push $DOCKER_RELEASE_IMAGE_TAGGED
- docker tag $DOCKER_RELEASE_IMAGE_TAGGED $DOCKER_RELEASE_IMAGE_LATEST
- docker push $DOCKER_RELEASE_IMAGE_LATEST
dependencies:
- build
only:
- tags
pages:
stage: deploy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment