diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index aa29a7742..5c66ed938 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -18,6 +18,7 @@ stages: - compile - lint - test + - release default: image: @@ -39,7 +40,7 @@ compile: artifacts: paths: - ${CI_PROJECT_DIR}/.stack-work/ - - ${CI_PROJECT_DIR}/.stack/ + - bin/ cache: &backend-cache lint: @@ -55,3 +56,18 @@ test: script: - make -- backend-test${PROD_BUILD} cache: *backend-cache + +container: + stage: release + image: ${IMAGE_BUILDER} + needs: + - compile + - lint + - test + script: + - IMAGE_TAG=`./.gitlab-ci/version.pl` + - buildah bud -t ${IMAGE_TAG} --volume ${CI_PROJECT_DIR}/bin/:/tmp/uniworx-bin --file docker/fradrive/Dockerfile + - buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${CI_REGISTRY_IMAGE}/${IMAGE_TAG} + rules: # should be equivalent to *release-rules in .gitlab-ci.yml + - if: $CI_COMMIT_TAG =~ /^v[0-9\.]+$/ + - if: $CI_COMMIT_TAG =~ /^v[0-9\.]+-test-.*$/ \ No newline at end of file