我希望有可能在合并请求上运行不同的任务(选定的任务)。如何配置.gitlab-ci.yml / GitLab CI设置才有可能?
deploy_test:
only:
- master
script:
- echo "Deploying ..."
deploy_test_v2:
only:
- master
script:
- echo "Deploying ..."
when: manual
deploy_test_v3:
only:
- master
script:
- echo "Deploying ..."
when: manual
我想选择在合并时自动调用三者中的哪一个。现在deploy_test
会在合并时自动调用; deploy_test_v2
和deploy_test_v3
可以在之后手动调用。这不是我想要的。
换句话说:
我有3个工作test
服务器:
staging
数据库的完整部署。staging
DB的部署。我想让开发人员选择将要执行的作业。
你可以使用merge request pipelines:
build:
stage: build
script: ./build
only:
- merge_requests