diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19eda7c..a749119 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,42 +1,23 @@ include: - project: "devops/pena-continuous-integration" file: "/templates/docker/build-template.gitlab-ci.yml" - - project: "devops/pena-continuous-integration" - file: "/templates/docker/clean-template.gitlab-ci.yml" - project: "devops/pena-continuous-integration" file: "/templates/docker/deploy-template.gitlab-ci.yml" stages: - - clean - build - deploy - -clear-old-images: - tags: - - frontbuild - extends: .clean_template - variables: - STAGING_BRANCH: "main" - PRODUCTION_BRANCH: "main" - image: - name: docker/compose:1.28.0 - entrypoint: [""] - before_script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker images - script: - - docker system prune -af build-app: tags: - frontbuild extends: .build_template variables: DOCKER_BUILD_PATH: "./Dockerfile" - STAGING_BRANCH: "main" + STAGING_BRANCH: "staging" PRODUCTION_BRANCH: "main" deploy-to-staging: extends: .deploy_template - variables: - DEPLOY_TO: "staging" - BRANCH: "main" + tags: + - front + - staging diff --git a/deployments/staging/docker-compose.yaml b/deployments/staging/docker-compose.yaml index ee06d99..3ab31f2 100644 --- a/deployments/staging/docker-compose.yaml +++ b/deployments/staging/docker-compose.yaml @@ -2,7 +2,7 @@ services: respondent: container_name: respondent restart: unless-stopped - image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID + image: $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID networks: - marketplace_penahub_frontend hostname: respondent