build trigger condition on checkin

140 views
Skip to first unread message

Hector Magnanao

unread,
Apr 27, 2016, 11:13:05 AM4/27/16
to Jenkins Users
Hi,

I'm using Jenkins 1.625.2 on Windows and I was wondering if there was a way to trigger a build only on certain file types.  Right now my build runs on every checkin and I'd like to narrow it to down to a few type of checkins.

thanks,

Tom Moore

unread,
Apr 28, 2016, 11:51:51 AM4/28/16
to Jenkins Users

If you use a post-commit hook/script to call a jenkins build, then you can have the hook/script use a regex matching the file types you want to watch and only trigger a build if a match is found.

If you are using polling and use Subversion for your SCM, then in the  Source Code Management section under the Subversion Modules subsection, choose advanced and place a regex matching the file types you want to watch in the included regions box.  Or you can exclude certain files, users, commit messages, or revisions with specfic revision properties using the excluded regions box, excluded users box, excluded commit messages, or exclusion revprop name fields.

If you are using polling and use Git for your SCM, then using the additional behaviors pulldown, you can ignore commits from specific users, on specific paths, or with specific commit messages.   To build on polling if specific files/paths changed, use the "Polling ignores commits in certain paths" behavior (I know... not obvious) and put your regex of files to trigger the build in the included regions box.


Magnanao, Hector

unread,
Apr 29, 2016, 10:55:18 AM4/29/16
to jenkins...@googlegroups.com

I’m using PTC Integrity for my SCM tool, do you have any suggestions on that ?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1d6f81d3-2ebf-4018-bdcd-6e3da696b4fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Moore

unread,
Apr 29, 2016, 11:36:17 AM4/29/16
to Jenkins Users


On Friday, April 29, 2016 at 10:55:18 AM UTC-4, Hector Magnanao wrote:

I’m using PTC Integrity for my SCM tool, do you have any suggestions on that ?

 


I've never used the PTC Integrity CM plugin, so I'm only able to guess based off the wiki: 
https://wiki.jenkins-ci.org/display/JENKINS/PTC+Integrity+Plugin

I see an include and exclude option under the advanced options.   The wiki doesn't describe their purpose, but if they work the same as the Subversion and Git plugins, then those would be the fields to put your regexes into for conditional checkout testing.    Like I said, I've never used this plugin and don't use PTC Integrity, so you'll have to experiment from there.
Reply all
Reply to author
Forward
0 new messages