Jenkins + Maven + Post Build Deliver
Hi,
I have adapted the Jenkins integration described here https://jazz.net/wiki/bin/view/Main/JazzScmWithJenkins to use maven.
Basically I did split the provided ant script and created, in Jenkins, a maven project instead of a “free-style software project". In jenkins, I also added a pre step and a post step.
So in Jenkins we have something like:
- Pre step = first part of the initial ant script (retrieve sources from RTC SCM)
- Maven step
- Post step = second and last part of the initial and script (sends Jenkins build completion signal to RTC)
In RTC, I create a build definition to call the Jenkins build. I added a Post Build Deliver with the following options:
- Always deliver
- Set snapshot owner to target stream
But it actually never delivers to the target stream nor change the snapshot owner, whether the build is successful or not.
Any idea?
I suspect some interference between the Post Step ant script and the Post Step ant script.
The post step ant script is basically a call to
<target name="completeBuild">
<!-- Complete the compile build activity. -->
<completeBuildActivity activityId="${compileActivityId}"
buildResultUUID="${buildResultUUID}"
repositoryAddress="${repositoryAddress}"
userId="${userId}"
passwordFile="${passwordFile}" />
<echo message="Build ${buildDefinitionId} completed." />
</target>
|
Accepted answer
Please see answer in Discussion thread for the JazzScmWithJenkins wiki topic (242037)
comment 38.
Also note that the compileActivityId property will likely be unset, unless you're taking special measures to ensure it gets passed from the first step to the last, so completeBuildActivity invocation may fail. You reported this earlier in comment 26 of the work item. Were you able to resolve it? An alternative approach is to use autoComplete="true" on the startBuildActivity invocation, in which case the completeBuildActivity is not needed. The activity will get auto-completed when the build is done, or if a new sibling activity is started.
Oscar Picasso selected this answer as the correct answer
|
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.