只有在特定文件集发生更改时才能触发构建 [英] How to trigger a build only if changes happen on particular set of files

查看:88
本文介绍了只有在特定文件集发生更改时才能触发构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何告诉jenkins / hudson触发一个构建,仅用于我的git树上特定项目的更改? 解决方案 div>

git插件有一个选项(排除区域),用于根据提交中的文件是否与排除区域正则表达式匹配来决定是否跳过构建。不幸的是,股票git插件目前没有包含区域功能(1.15)。然而,有人在github上发布了修补程序,这些修补程序在Jenkins和Hudson上运行,实现了您想要的功能。



这是一个小小的工作,但它可以像广告一样工作,因为我的一个git树有多个独立的项目,所以它是非常有用的。

https://github.com/jenkinsci/git-plugin/pull/49

编辑:git插件(1.16)现在有'包含'地区功能。


I would like to know how to tell jenkins/hudson to trigger a build only for changes on a particular project on my git tree?

解决方案

The git plugin has an option (excluded region) to use regexes to determine whether to skip building based on whether files in the commit match the excluded region regex. Unfortunately, the stock git plugin does not have a "included region" feature at this time (1.15). However, someone posted patches on github that work on Jenkins and Hudson that implement the feature you want.

It is a little work to build, but it works as advertised and has been extremely useful since one of my git trees has multiple independent projects.

https://github.com/jenkinsci/git-plugin/pull/49

EDIT: The git plugin (1.16) now has the 'included' region feature.

这篇关于只有在特定文件集发生更改时才能触发构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆