配置要并行运行的作业实例数,此值必须大于或等于2并且小于或等于50。
这将创建N个并行运行的同一作业实例. 它们从job_name 1/N
到job_name N/N
依次命名。
codescan:
stage: codescan
tags:
- build
only:
- master
script:
- echo "codescan"
- sleep 5;
parallel: 5
综合实例
before_script:
- echo "before-script!!"
variables:
DOMAIN: example.com
stages:
- build
- test
- codescan
- deploy
build:
before_script:
- echo "before-script in job"
stage: build
script:
- echo "mvn clean "
- echo "mvn install"
- echo "$DOMAIN"
after_script:
- echo "after script in buildjob"
unittest:
stage: test
script:
- ech "run test"
when: delayed
start_in: '5'
allow_failure: true
retry:
max: 1
when:
- script_failure
timeout: 1 hours 10 minutes
deploy:
stage: deploy
script:
- echo "hello deploy"
- sleep 2;
when: manual
codescan:
stage: codescan
script:
- echo "codescan"
- sleep 5;
when: on_success
parallel: 5
after_script:
- echo "after-script"
- ech
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论