front-hub/.gitlab-ci.yml

35 lines
710 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:
tags:
- frontbuild
extends: .build_template
variables:
DOCKER_BUILD_PATH: "./Dockerfile"
STAGING_BRANCH: "staging"
PRODUCTION_BRANCH: "main"
deploy-to-staging:
tags:
- front
- staging
rules:
- if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH"
extends: .deploy_template
deploy-to-prod:
tags:
- front
- prod
rules:
- if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH"
extends: .deploy_template