Jenkins: Skip Build If No Changes Found
You can use "Poll SCM" option under the Build Triggers section.
Once above option is selected you will be able to set Schedule
for polling.
Say for eg. if you set schedule to be @hourly
then Jenkins will poll SCM(TFS in this case) every hour and look for changes, if there are any it will build the job else it will not.
In addition to (@yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly) Schedule
field follows the syntax of cron i.e MINUTE HOUR DOM MONTH DOW
Examples:
every fifteen minutes -> H/15 * * * *
Eric
Working on build/release management and deployment using nANT/MSBUILD, CruiseControl.net, Team Foundation Server, Powershell, Jenkins build server, Atlassian tool stack (Bamboo, BitBucket, JIRA, etc.)
Updated on June 04, 2022Comments
-
Eric almost 2 years
I am using Jenkins to build a large .NET-based solution tied in to TFS. The first step in the script is to get the latest change sets from TFS, then build the solution. In some other tools I've used, there were options to skip the build if no new changes were found in TFS. Does a similar feature exist in Jenkins? Seems kind of silly to rebuild the entire solution and deploy it if there is nothing new since the last build.
-
PatrickLu-MSFT almost 6 yearsHi Eric, any update on this thread, have you figured it out? If my reply helped or gave a right direction. Appreciate for marking it as an answer which will also helps others in the community.
-