GitLab 병렬 작업이 있는 파이프라인
GitLab Docker Image는 병렬 작업을 포함하는 파이프라인에서 GitLab 변경 만들기를 지원합니다.
주:
파이프라인에 GitLab 병렬 작업이 있는 경우 가 아닌 when:manualDocker 이미지를 사용하는 GitLab 것이 좋습니다. Docker 이미지에 대한 GitLab 자세한 내용은 을 참조하십시오 ServiceNow 에 대한 사용자 지정 작업 GitLab.
병렬 작업을 보여 주는 샘플 yaml 파이프라인:
image: servicenowdocker/sndevops:3.1.0 # Update docker version per your current version.
stages:
- pre-build
- build
- test
- pre-prod
- prod
Scan PreProd:
stage: pre-build
script:
- echo $CI_JOB_NAME
Check policies in PreProd:
stage: build
needs:
- job: "Scan PreProd"
script:
- exit 1 # Simulating a failed test job
allow_failure: true # Allow this job to fail without stopping the pipeline
Check policies in Prod:
stage: build
needs:
- job: "Scan PreProd"
script:
- echo $CI_JOB_NAME
Deploy App in Test:
stage: test
needs:
- job: "Scan PreProd"
script:
- echo $CI_JOB_NAME
Deploy App in PreProd:
stage: pre-prod
needs:
- job: "Deploy App in Test"
- job: "Check policies in PreProd"
allow_failure: false
script:
- echo $CI_JOB_NAME
- sndevopscli create change -p "{\"changeStepDetails\":{\"timeout\":3600,\"interval\":100},\"autoCloseChange\":true}"
Deploy App in Prod:
stage: prod
needs:
- job: "Deploy App in PreProd"
- job: "Check policies in Prod"
allow_failure: false
script:
- echo $CI_JOB_NAME
- sndevopscli create change -p "{\"changeStepDetails\":{\"timeout\":3600,\"interval\":100},\"autoCloseChange\":true}"