From 92016c52697a0684035a6efc6a4b63b47bd81f0a Mon Sep 17 00:00:00 2001 From: Rafael Chaves Freitas Date: Fri, 30 Oct 2020 19:43:51 -0300 Subject: [PATCH] habilita pipeline para prod --- .gitlab-ci.yml | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e79878c..a3ec622 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,31 +41,19 @@ deploy to homolog: - docker -# build to production: -# variables: -# GIT_SUBMODULE_STRATEGY: normal -# stage: build -# script: -# - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY -# - docker pull mapasculturais/mapasculturais:v5.0.0-RC -# - docker build -t $RELEASE_IMAGE -f compose/production/Dockerfile . -# - docker tag $RELEASE_IMAGE "$CI_REGISTRY_IMAGE:latest" -# - docker push $RELEASE_IMAGE -# - docker push "$CI_REGISTRY_IMAGE:latest" -# only: -# - tags -# environment: production -# tags: -# - docker - -# deploy to production: -# stage: deploy -# image: hacklab/kubectl:latest -# script: -# - echo ${kube_config} | base64 -d > ${KUBECONFIG} -# - kubectl -n mapasculturais-aldirblanc-prod --record deployment.apps/mapasculturais set image deployment.apps/mapasculturais mapasculturais=$RELEASE_IMAGE -# only: -# - tags -# environment: production -# tags: -# - docker +build to production: + variables: + GIT_SUBMODULE_STRATEGY: normal + stage: build + script: + - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY + - docker pull mapasculturais/mapasculturais:v5.0.0-RC + - docker build -t $RELEASE_IMAGE -f compose/production/Dockerfile . + - docker tag $RELEASE_IMAGE "$CI_REGISTRY_IMAGE:latest" + - docker push $RELEASE_IMAGE + - docker push "$CI_REGISTRY_IMAGE:latest" + only: + - tags + environment: production + tags: + - docker \ No newline at end of file -- 2.26.2