This commit is contained in:
skeris 2025-02-24 18:26:09 +03:00
parent 63fd61537c
commit c97085b394
3 changed files with 22 additions and 12 deletions

@ -3,12 +3,9 @@ include:
file: "/templates/docker/build-template.gitlab-ci.yml" file: "/templates/docker/build-template.gitlab-ci.yml"
- project: "devops/pena-continuous-integration" - project: "devops/pena-continuous-integration"
file: "/templates/docker/deploy-template.gitlab-ci.yml" file: "/templates/docker/deploy-template.gitlab-ci.yml"
- project: "devops/pena-continuous-integration"
file: "/templates/docker/service-discovery.gitlab-ci.yml"
stages: stages:
- build - build
- deploy - deploy
- service-discovery
build-app: build-app:
tags: tags:
@ -17,7 +14,7 @@ build-app:
variables: variables:
DOCKER_BUILD_PATH: "./Dockerfile" DOCKER_BUILD_PATH: "./Dockerfile"
STAGING_BRANCH: "staging" STAGING_BRANCH: "staging"
PRODUCTION_BRANCH: "main" PRODUCTION_BRANCH: "eng"
deploy-to-staging: deploy-to-staging:
extends: .deploy_template extends: .deploy_template
@ -29,11 +26,12 @@ deploy-to-staging:
deploy-to-prod: deploy-to-prod:
extends: .deploy_template extends: .deploy_template
variables:
DOCKER_BUILD_PATH: "./Dockerfile"
STAGING_BRANCH: "staging"
PRODUCTION_BRANCH: "eng"
rules: rules:
- if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH" - if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH"
tags: tags:
- front - front
- prod - prod
service-discovery:
extends: .sd_artefacts_template

@ -0,0 +1,13 @@
version: "3"
services:
respen:
container_name: respen
restart: unless-stopped
image: $CI_REGISTRY_IMAGE/eng:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
hostname: respen
tty: true
networks:
- main_default
networks:
main_default:
external: true

@ -1,9 +1,8 @@
version: "3" version: "3"
services: services:
respondent: respondent_en:
container_name: respondent container_name: respondent_en
restart: unless-stopped restart: unless-stopped
image: $CI_REGISTRY_IMAGE/main:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID image: $CI_REGISTRY_IMAGE/eng:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
hostname: respondent hostname: respondent_en
tty: true tty: true