Skip to content
Snippets Groups Projects
Commit 7bbbb239 authored by Jacopo Gasparetto's avatar Jacopo Gasparetto
Browse files

feat(ci-cd): Add version to backend images

parent 9371b47d
No related branches found
No related tags found
1 merge request!10fix(ci-cd): Add version to backend images
Pipeline #100167 passed
......@@ -45,9 +45,10 @@ build-backend:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- VERSION="$(cat version.txt)"
script:
- docker build --pull -t $CI_REGISTRY_IMAGE/backend:$CI_COMMIT_REF_SLUG backend
- docker push $CI_REGISTRY_IMAGE/backend:$CI_COMMIT_REF_SLUG
- docker build --pull -t "${CI_REGISTRY_IMAGE}/backend:v${VERSION}" backend
- docker push "${CI_REGISTRY_IMAGE}/backend:v${VERSION}"
only:
changes:
- .gitlab-ci.yml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment