diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e79878cee35328782d14f0fe173db73c2698e89b..a3ec622e15a397b27ae5b962e7bb79c1ef136068 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