trigger new build when creating a new tag in SVN

240 views
Skip to first unread message

yuki

unread,
Aug 31, 2016, 5:17:07 PM8/31/16
to Jenkins Users
Hi,
 I got Jenkins installed to build periodically against a project in SVN (using polling). I like in addition to that Job that is is correctly working, to have another job that would trigger only when I add a new tag to the project in the SVN, and have it do do this things:
1) build the project
2) zip the project and copy it to a backup drive.

I figured out I could write a .bat script to the zipping, moving part. But i cannot figure out to make the process happen automatically when the project gets a new tag. How can this be achieved? How can I configure Jenkins to the detect that a new tag has been added to the repository and make it act in consequence?

Thanks

Alex Domoradov

unread,
Sep 2, 2016, 3:25:15 AM9/2/16
to Jenkins Users
Have you tried Included Regions field?

If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders that are not in this list when determining if a build needs to be triggered.

Each inclusion uses regular expression pattern matching, and must be separated by a new line.

This is useful when you need to check out an entire resource for building, but only want to do the build when a subset has changed.


/trunk/myapp/c/library1/.* /trunk/myapp/c/library2/.*
If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees.

yuki

unread,
Sep 2, 2016, 4:22:47 PM9/2/16
to Jenkins Users
Hi, 
thanks for your answer. I'll try playing with the included regions. 

Since I want to build only when a new Tag is created, and the folder for the tag in question will not exist when I do the configuring I guess I 'll have to watch for changes in the tags root folder, right?

Reply all
Reply to author
Forward
0 new messages