Skip to content
Snippets Groups Projects
Commit 5ee0bafb authored by Rohith's avatar Rohith
Browse files

- building on the tags onlu

parent 41c72b16
No related branches found
No related tags found
No related merge requests found
...@@ -30,22 +30,20 @@ build: ...@@ -30,22 +30,20 @@ build:
- make deps - make deps
- make static - make static
artifacts: artifacts:
expire_in: 1w expire_in: 1d
paths: paths:
- bin/ - bin/
only: only:
- /^master$/
- /^v([0-9]{1,3}[.]?){3}.*$/ - /^v([0-9]{1,3}[.]?){3}.*$/
deploy: deploy:
stage: deploy stage: deploy
script: script:
- export VERSION=$CI_BUILD_TAG - export VERSION=$CI_BUILD_REF_NAME
- '[[ "$VERSION" == "master" ]] && VERSION="latest"' - '[[ "$VERSION" == "master" ]] && VERSION="latest"'
- docker login -u ${REGISTRY_USER} -p ${REGISTRY_TOKEN} -e ${REGISTRY_EMAIL} ${REGISTRY} - docker login -u ${REGISTRY_USER} -p ${REGISTRY_TOKEN} -e ${REGISTRY_EMAIL} ${REGISTRY}
- docker build -t ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} . - docker build -t ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} .
- docker push ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} - docker push ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION}
- docker rmi ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION} - docker rmi ${REGISTRY}/${REGISTRY_AUTHOR}/${NAME}:${VERSION}
only: only:
- /^master$/
- /^v([0-9]{1,3}[.]?){3}.*$/ - /^v([0-9]{1,3}[.]?){3}.*$/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment