2021-01-03 14:25:43 +05:30
|
|
|
stages:
|
|
|
|
- review
|
|
|
|
- production
|
|
|
|
|
|
|
|
.push-and-deploy:
|
2022-08-27 11:52:29 +05:30
|
|
|
image: '${CI_TEMPLATE_REGISTRY_HOST}/gitlab-org/cloud-deploy/aws-ec2:latest'
|
2021-01-03 14:25:43 +05:30
|
|
|
script:
|
|
|
|
- gl-ec2 push-to-s3
|
|
|
|
- gl-ec2 deploy-to-ec2
|
|
|
|
|
|
|
|
review_ec2:
|
|
|
|
extends: .push-and-deploy
|
|
|
|
stage: review
|
|
|
|
environment:
|
|
|
|
name: review/$CI_COMMIT_REF_NAME
|
|
|
|
rules:
|
|
|
|
- if: '$AUTO_DEVOPS_PLATFORM_TARGET != "EC2"'
|
|
|
|
when: never
|
2021-12-11 22:18:48 +05:30
|
|
|
- if: '$CI_KUBERNETES_ACTIVE || $KUBECONFIG'
|
2021-01-03 14:25:43 +05:30
|
|
|
when: never
|
|
|
|
- if: '$REVIEW_DISABLED'
|
|
|
|
when: never
|
2021-04-17 20:07:23 +05:30
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
2021-01-03 14:25:43 +05:30
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
|
|
|
|
|
|
|
|
production_ec2:
|
|
|
|
extends: .push-and-deploy
|
|
|
|
stage: production
|
|
|
|
environment:
|
|
|
|
name: production
|
|
|
|
rules:
|
|
|
|
- if: '$AUTO_DEVOPS_PLATFORM_TARGET != "EC2"'
|
|
|
|
when: never
|
2021-12-11 22:18:48 +05:30
|
|
|
- if: '$CI_KUBERNETES_ACTIVE || $KUBECONFIG'
|
2021-01-03 14:25:43 +05:30
|
|
|
when: never
|
2021-04-17 20:07:23 +05:30
|
|
|
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
|
2021-01-03 14:25:43 +05:30
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
|