--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks Slide.
With the Clearcase plug-in installed in Jenkins, wouldn’t it be possible to poll SCM (i.e Clearcase) for any changes that are delivered to Integration Stream by the developers.
If any changes are found in Integration Stream then Jenkins runs the particular build job.
Regards
T.S
I have one of my UCM projects setup to do exactly what you are requesting. Whenever a dev completes a delivery to the project integration stream, a “postop deliver_complete” trigger kicks off a build job using a URL (trigger builds remotely). Here’s what you’ll need:
1. Configure your Jenkins job to “Trigger builds remotely” (under Build Triggers).
- I named my token “BUILD_AFTER_DELIVER_COMPLETE”.
2. Make a ClearCase attribute used to enable or disable the automatic build triggering on a build stream.
- Create the attribute type in the PVOB (I named mine “TriggerBuildAfterDelivery).
- Scope: ordinary
- Enumeration values: “ON”, “OFF”
- Default value: “ON”
- Apply the attribute to any build stream that you wish to trigger a build.
3. Make a UCM trigger type that fires after a delivery has been completed.
- Create the trigger type in the PVOB (I named mine “JENKINS_BUILD_AFTER_DELIVERY”).
- all UCM object trigger
- post-op deliver_complete
- Executes corresponding trigger script
4. Write a trigger script, executed by the UCM trigger type, which constructs and executes the Jenkins URL.
- I wrote mine in Perl and named it “jenkinsBuildAfterDelivery.tgr”.
- My Jenkins build job name matches the name of the UCM stream being built (you’ll see why when you construct the URL).
- If you use Perl, use the LWP::Simple module for the get() subroutine.
- First get the value of the TriggerBuildAfterDelivery attribute (ct desc –s –attr $attr stream:$stream).
- If the value == “ON”, construct your URL and `get` it.
- Hint: $jobName = $buildStream = $ENV{CLEARCASE_STREAM};
I also serialized UCM deliveries on these specific build streams to prevent multiple devs from delivering concurrently, thus interfering with the build triggering. I’ll let you google for how to serialize UCM deliveries. It’s easy and essentially requires the same things: An attribute, a trigger type and a trigger script.
I’ve had this setup on my project for over a year now and it works great.
-Jeff Ng
--
Thanks a lot Jeff for your valuable guidance.
Thank You