How to prevent RTC from clearing jenkins workspace prior to a build
Trying to switch to using more declarative pipeline jobs in jenkins. Hit an issue where it seems for every build, the workspace is deleted upon job starting (during the fetch stage).
Accepted answer
Lakshmi's suggestion to use
agent {
options {skipDefaultCheckout(true)} }
Comments
Looks like however in doing this RTC no longer associates any builds to the workitems, e.g. "Included In Builds" does not have any links created anymore when using this approach. I think the only viable solution is just to create 100s of individual build definitions, which is annoying from a maintenance point of view but should be doable.
If you still need the traceability from the build result to work items, you can manually add "included in build" links using the workItemPublisher ant task.
One other answer
RTC 2.2 is no longer supported. The Jenkins plugin for that is likely no longer supported either. Or are you referring to the RTC Jenkins Plugin?
Comments
Brett Waldo
Feb 24 '21, 11:45 p.m.weird deja-vu, but i asked almost this exact question a few years back. (i don't remember and it didn't show up on google). But that time, the issue was my configuration, I don't believe that is the case here because I just switch back and forth between the configurations for it to work/not work.
Brett Waldo
Feb 24 '21, 11:56 p.m.Some more details, I found loading the pipeline script from a Stream versus from a workspace avoids this bug. I have yet to determine if there is any drawback to using the stream (e.g. not sure how polling for changes work etc)
Brett Waldo
Feb 25 '21, 2:19 a.m.For those wondering, using the stream I don't think is a decent option. The workspace has scoped components but the stream doesn't so you end up with extra builds for unrelated components and dirty change logs.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 25 '21, 2:43 a.m.If you think there is an issue, please open a support ticket or open a defect here: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWelcome
Brett Waldo
Feb 25 '21, 7:49 a.m.@rschoon , sorry, I wasn't clear in the description. Version 2.2 is the version of the plugin, which is most recent version as of 2/24/2021. RTC version is 6.0.6.1
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 26 '21, 2:07 a.m.I asked someone more competent than mI to have a look here. No promises.
Lakshmi Narasimhan T V
JAZZ DEVELOPER Feb 26 '21, 10:26 a.m.1 vote
Brett Waldo
Feb 26 '21, 11:23 a.m.Hello Lakshmi,