我可以只使用build_disabled环境变量在主分支上运行构建作业
我正在使用GitLab的AutodeVops运行CI,并且我想在主人分支以外的其他分支机构上禁用构建作业,因为我不需要在其他分支机构上运行构建作业。
看来我可以通过在规则中指定分支来做到这一点:如果在gitlab-ci.yaml中,但是我只能使用CI/CD环境变量build_disabled做到这一点吗?
I am running ci using gitlab's autodevops, and I would like to disable build job on working branches other than master because I don't need to run build jobs on other branches.
It looks like I can do this by specifying the branch in rules:if in gitlab-ci.yaml, but can I do that using only the ci/cd environment variable BUILD_DISABLED?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我似乎不可能只使用环境变量build_disabled在主分支上运行该作业。
仅使用声明或规则语句,它可以实现。
I seemed impossible to run the job on only the master branch using the environment variable BUILD_DISABLED.
Use only statement or rules statement and It can realize.