Commit 65f87abc authored by Ryan Herbert's avatar Ryan Herbert

ci merge pre_deploy_docker and deploy_docker

Since two stages aren't necessrily executed on the same slave, we need
to build the image and push it in the same stage
parent 3047dafa
Pipeline #43560 passed with stage
in 5 seconds
......@@ -23,8 +23,6 @@ stages:
- valgrind_functional
- multiple_tests
- prepare_deploy
- pre_deploy_docker
- deploy_docker
- deploy_prod
# Anchors
......@@ -332,27 +330,13 @@ deploy_review:
tags:
- web
pre_deploy_docker:
stage: pre_deploy_docker
script:
- export CUR_DATE=date +%Y-%m-%d
- export TYPE=$CI_COMMIT_REF_NAME | awk '{ gsub(/prod-/, "") }{ print $1 }'
- export TAG="vidjil/$TYPE:$CI_COMMIT_SHA-$CUR_DATE"
- docker build --no-cache --build-arg git_branch=$CI_COMMIT_REF_NAME --build-arg build_env=PRODUCTION -t $TAG docker/vidjil-$TYPE
when: manual
only:
- prod-server
- prod-client
tags:
- web
- docker
deploy_docker:
stage: deploy_docker
stage: deploy_prod
script:
- export CUR_DATE=date +%Y-%m-%d
- export TYPE=$CI_COMMIT_REF_NAME | awk '{ gsub(/prod-/, "") }{ print $1 }'
- export TAG="vidjil/$TYPE:$CI_COMMIT_SHA-$CUR_DATE"
- docker build --no-cache --build-arg git_branch=$CI_COMMIT_REF_NAME --build-arg build_env=PRODUCTION -t $TAG docker/vidjil-$TYPE
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker push $TAG
- docker tag $TAG "vidjil/$TYPE:latest"
......
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