[英]In GitLab Pipelines is there a way to run a pipeline when a Merge Request is detached?
I am trying to run a pipeline when a merge request in gitlab is detach means that is not a success and is rejected or closed without merging into the branch.我试图在 gitlab 中的合并请求分离时运行管道,这意味着不成功并且在没有合并到分支的情况下被拒绝或关闭。 So is it possible to execute it only for CI_MERGE_REQUEST_EVENT_TYPE=detach as we execute for particular branches?
那么当我们为特定分支执行时,是否可以只为 CI_MERGE_REQUEST_EVENT_TYPE=detach 执行它?
You should be able to use only:
with the variables:
option.您应该只能使用
only:
和variables:
选项。 I ditn't test this, but please try adding this a job:我没有对此进行测试,但请尝试将其添加到作业中:
only:
variables:
- $CI_MERGE_REQUEST_EVENT_TYPE == "detach"
See the documentation for more details: https://docs.gitlab.com/ee/ci/yaml/README.html#onlyvariablesexceptvariables有关更多详细信息,请参阅文档: https : //docs.gitlab.com/ee/ci/yaml/README.html#onlyvariablesexceptvariables
only:
- merge_requests
Documentation: https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html文档: https : //docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.