How does post build deliver option works in RTC builds when configured builds with Jenkins being as build engine.
Hello All,
How does post build deliver option works in RTC builds when configured builds with Jenkins being as build engine.
Scenario 1:
Developers making changes on their local machine (Sandox). Jenkins as build engine have to build the changes made in developer's local machine (Sandbox changes). If the build is successful, we have to check in the changes to repository workspace and deliver the changes to the stream. How do we achieve this, any suggestions or solutions would be of great help.
Scenario 2:
Developer making their changes on their local machines(Sandbox) will check in their changes to repository workspaces and have to request a personal build (giving repository workspace as an input for the workspace). If the build is successful, then the checked in changes have to be delivered to the stream using post build deliver option in build definition (Details of the stream and the list of components to be mentioned in their respective fields.
Build is successfully built but the post build delivery option is not working as expected and the changes are not being delivered to the stream.
Kindly let me know any solutions available for achieving this.
Thanks in advance.
|
One answer
The RTC Jenkins integration will help you manage the source control side of things. There are two parts available:
- the RTC Jenkins Plugin that is installed into Jenkins
- the Hudson/Jenkins build definition that runs in RTC
This article will help you understand both https://jazz.net/library/article/89330
Regarding your scenarios...
Scenario 2 is the only way you can do an RTC based build/deliver - developers need to check changes into their workspace repository in order for the build engine to be able to access them for a personal build. If they have their workspace repository set up correctly you shouldn't have to explicitly select it when you ask for a personal build and you've chosen Jazz Source Control as one of the build definition options.
Also you need to make sure the build engine has its own workspace repository. The rest should be straightforward if you follow the help:
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.build.doc%2Ftopics%2Fc_jenkins_overview.html
I have done this many times before and there was nothing tricky from memory - if you have the build definition set up properly then it will handle fetching the developer's code into the build engine's dedicated workspace repository, and the post build delivery to a stream after a successful build. The only thing you will need to worry about is to make sure your Jenkins build steps find the code in the engine's sandbox - the easiest way to do this is to use the Jenkins plugin, and set it to use the build definition, then everything is automatic:
Comments
Hi Davyd,
Thanks a lot for your valuable time, quick response and providing some useful links. I have tried implementing the above suggestions on my instance with 3 options under Source Code Management in Jenkins Job configuration. But has no luck in delivering the changes from repository workspace to stream with all 3 options.
Post build deliver option is getting skipped when Stream or Repository workspace options are used but throwing an exception error when build definition is used in Jenkins SCM Configurations.
I am trying to build the changes checked into repository workspace and need to deliver the changes to stream from Jenkins. Please let us know if SCM CLI supports for achieving this and how the configurations to be done from Jenkins and RTC if it supports.
Thanks in advance!
Davyd Norris
commented Oct 30 '18, 5:25 a.m.
Stream or Repository will not trigger any response in RTC, because the RTC build definition will not be notified of the build result. You need to get the Build Definition option working.
Can you post screen shots of your build definition, your Jenkins plugin configuration, and the exception information?
Hi Davyd,
Thanks for your prompt response. Unfortunately, I do not have enough credits to post screenshots on jazz.net.
But the exception error message in Jenkins log when build definition is configured with post build deliver option and also SCM configured with build definition is as follows. Please suggest.
RK G
commented Oct 30 '18, 5:53 a.m.
Hi Davyd,
Thanks for your prompt response and I do not have enough reputation points to post screenshots on jazz.net. But the error message is as follows when build definition has been configured as SCM option in Jenkins and also post build deliver option is configured in Build Definition.
Error Message:
ERROR: Step ‘RTC Post Build Deliver ’ aborted due to exception: java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.impl.conn.ManagedHttpClientConnectionFactory at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:487)
That error suggests that the problem is in your Jenkins setup, and is due to a missing or corrupted httpclient jar file. This jar file is part of the Apache HTTP components so you can download it and put it into your Jenkins server path.
This will be why you are having problems - fix this and you will be all sorted
UPDATE - looks like the HTTP components are available as a Jenkins plugin:
Davyd Norris
commented Oct 30 '18, 7:30 a.m.
I assume you have seen this info? There are a lot of things you can check here too
RK G
commented Oct 31 '18, 1:09 a.m.
Hi davyd, Greetings for the day. Will try implementing this and get back to you with the results. And yes, I have gone through the plugin for integrating Jenkins and RTC page.
Thank you.
showing 5 of 7
show 2 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.