GitLab CI production. 2: |
.gitlab-ci.yml
.git push
, .gitlab-ci.yml
production. GitLab: #24794 #20826 ..gitlab-ci.yml
DevOps, .. .ci_admin
. true
, git push
.gitlab-ci.yml
.GITLAB_USER_ID
GITLAB_USER_EMAIL
. , , . #21825, (upstream) GitLab CI 8.12:artifact
, ( ) . , , : - . .touch
, deploy to qa-*, staging, .test integration:
stage: testing
tags: [deploy]
script:
- mkdir -p .ci_status
- echo "test integration"
- touch .ci_status/test_integration
artifacts:
paths:
- .ci_status/
deploy to qa-1:
tags: [deploy]
stage: staging
when: manual
script:
- if [ ! -e .ci_status/test_unit -o ! -e .ci_status/test_integration -o ! -e .ci_status/test_selenium ]; then echo " "; exit 1; fi
- echo "execute job ${CI_BUILD_NAME}"
- touch .ci_status/deploy_to_qa_1
artifacts:
paths:
- .ci_status/
artifact
, , GitLab CI . , .ci_status
, (mkdir -p
).approve:
script:
- mkdir -p .ci_status
- echo $(date +%s) > .ci_status/approved
artifacts:
paths:
- .ci_status/
NOT approve:
script:
- mkdir -p .ci_status
- echo $(date +%s) > .ci_status/not_approved
artifacts:
paths:
- .ci_status/
deploy to production:
script:
- if [[ $(cat .ci_status/not_approved) > $(cat .ci_status/approved) ]]; then echo " -"; exit 1; fi
- echo "deploy to production!"
GITLAB_USER_ID
GITLAB_USER_EMAIL
. REST API ..gitlab-ci.yml
. , - , , qa pre-production . , , ..gitlab-ci.yml
https://-/ci/lint
. !