git - Jenkins - 不要为特定的提交或提交消息构建

标签 git jenkins continuous-integration build-process

我在使用 Jenkins 及其 Git 插件时遇到一些问题。

目前,Gitlab 服务器正在触发构建,但我想配置作业,以便在提交中包含特定消息时不构建。

我试过使用 ci-skip 插件 ( https://github.com/banyan/jenkins-ci-skip-plugin ) 但不是不启 Action 业,而是插件允许它启动但随后中止它。

它完成了工作,但我在 Jenkins 历史中中止了构建,我正在努力避免这种情况。

有人设法做到了吗?

最佳答案

Jenkins git 插件本身已经提供了这些高级用法。

排除特定消息

Job config page -->Source Code Management-->Git-->Add -->Polling ignores commits with certain messages

排除特定的提交者

Job config page -->Source Code Management-->Git-->Add -->Polling ignores commits from certain users

不要忘记单击每个末尾的帮助以了解正确的使用方法。

关于git - Jenkins - 不要为特定的提交或提交消息构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33981607/

相关文章:

Jenkins:中止多作业中作业的执行

linux - 在 Linux 上移动 Git 安装

git - 如何将旧提交移动到 git 中的另一个分支?

git - 将 Git 存储库添加到 Perforce 仓库

Git 与 squash merge 但保留网络图

node.js - Windows Bash 脚本退出而不执行所有命令

git - 在 Jenkins 中发布到 Artifactory 时使用 Git SHA 提交 ID 作为 Artifactory 版本号

java - 开发和生产测试时的不同 URL

debugging - 当 Jenkins 作业因“java.io.IOException”失败且无法删除作业时如何调试

c# - appharbor 上失败测试的堆栈跟踪