From 5ee0bafba4663efadd5b03c0567a6deadb5e439b Mon Sep 17 00:00:00 2001 From: Rohith <gambol99@gmail.com> Date: Sat, 13 Aug 2016 17:55:54 +0100 Subject: [PATCH] - building on the tags onlu --- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c09aab..65665e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,22 +30,20 @@ build: - make deps - make static artifacts: - expire_in: 1w + expire_in: 1d paths: - bin/ only: - - /^master$/ - /^v([0-9]{1,3}[.]?){3}.*$/ deploy: stage: deploy script: - - export VERSION=$CI_BUILD_TAG + - export VERSION=$CI_BUILD_REF_NAME - '[[ "$VERSION" == "master" ]] && VERSION="latest"' - docker login -u ${REGISTRY_USER} -p ${REGISTRY_TOKEN} -e ${REGISTRY_EMAIL} ${REGISTRY} - docker build -t ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} . - docker push ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} - docker rmi ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} only: - - /^master$/ - /^v([0-9]{1,3}[.]?){3}.*$/ -- GitLab