避免在某些文件更改时触发构建(例如 README.md)
Avoid triggering build on certain file changes (e.g README.md)
有什么方法可以避免在某些与源代码不直接相关的文件提交时触发构建?
例如我不想在任何人对 README.md 文件或某些参考文档文件进行更改时触发自动构建。
找了好久终于找到了一个Jenkins plugin可以在commit message中有关键字“[ci skip]”时跳过build的
这允许跳过任何具有此关键字 [ci skip] 的文件提交的构建。
唯一的缺点是,即使有人在代码文件中提交 [ci skip],它也会跳过构建
Github: jenkins-ci-skip-plugin
我不知道 plugin page or the Wiki 中是否有描述,但至少根据高级 Features/Additional 行为,git 插件可以配置为执行您的操作'正在以多种方式寻找。
例如:Polling ignores commits in certain paths
允许您指定 Included region 或 Excluded region" 帮助 (?) 说:
Each exclusion uses java regular expression pattern matching, and must
be separated by a new line.
myapp/src/main/web/.*\.html
myapp/src/main/web/.*\.jpeg
myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
您必须尝试一下。少一个插件 - KISS!
有什么方法可以避免在某些与源代码不直接相关的文件提交时触发构建?
例如我不想在任何人对 README.md 文件或某些参考文档文件进行更改时触发自动构建。
找了好久终于找到了一个Jenkins plugin可以在commit message中有关键字“[ci skip]”时跳过build的
这允许跳过任何具有此关键字 [ci skip] 的文件提交的构建。
唯一的缺点是,即使有人在代码文件中提交 [ci skip],它也会跳过构建
Github: jenkins-ci-skip-plugin
我不知道 plugin page or the Wiki 中是否有描述,但至少根据高级 Features/Additional 行为,git 插件可以配置为执行您的操作'正在以多种方式寻找。
例如:Polling ignores commits in certain paths
允许您指定 Included region 或 Excluded region" 帮助 (?) 说:
Each exclusion uses java regular expression pattern matching, and must be separated by a new line.
myapp/src/main/web/.*\.html myapp/src/main/web/.*\.jpeg myapp/src/main/web/.*\.gif
The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.
您必须尝试一下。少一个插件 - KISS!