Services/.gitlab-ci.yml

39 lines
757 B
YAML

include:
- project: "devops/pena-continuous-integration"
file: "/templates/docker/build-template.gitlab-ci.yml"
- project: "devops/pena-continuous-integration"
file: "/templates/docker/deploy-template.gitlab-ci.yml"
stages:
- build
- deploy
build-app:
extends: .build_template
stage: build
tags:
- frontbuild
variables:
DOCKER_BUILD_PATH: "build/Dockerfile"
PRODUCTION_BRANCH: main
STAGING_BRANCH: staging
deploy-to-staging:
extends: .deploy_template
rules:
- if: $CI_COMMIT_BRANCH == $STAGING_BRANCH
tags:
- front
- staging
stage: deploy
deploy-to-prod:
extends: .deploy_template
rules:
- if: $CI_COMMIT_BRANCH == $PRODUCTION_BRANCH
tags:
- front
- prod
stage: deploy