It's all about the answers!

Ask a question

Build Definition - Post Build deliver


Rainy John (381120) | asked Nov 22 '13, 10:32 a.m.
retagged Nov 22 '13, 12:34 p.m. by David Lafreniere (4.1k7)

I observe that the post build deliver operation is not happening as expected.

I have multiple build definitions. If the build is success, I have pointed to deliver the components from each of f the workspace to a single target stream.

Will it not work?

My requirement is that fhe source code from my different sub teams have to be delivered to a single stream for further integration if the sub-team build is successful.


Comments
David Lafreniere commented Nov 22 '13, 12:33 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Rainy John, can you provide additional information.

Perhaps a screenshot of the "Post-build Deliver" tab if your build definition so we can see what settings you are using.

You can also look through your build log, this will tell you why the post-build deliver participant was aborted. Here's an example of what might appear in a build log:
2013-11-18 00:44:04 [Jazz build engine] Invoking post-build participant "com.ibm.team.build.autoDeliver"
2013-11-18 00:44:04 [Jazz build engine] Aborting post-build deliver. The current post-build deliver trigger policy is set to "NO_WARNINGS" and the build status is "ERROR".


Rainy John commented Nov 23 '13, 2:39 a.m. | edited Nov 23 '13, 2:49 a.m.

I selected 'Enable post build deliver' and 'Deliver always' options.

One more info - I am getting a warning like 'the selected deliver target is currently used in the build definition <x>'

Btb, where is the build log available?


David Lafreniere commented Nov 23 '13, 1:18 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Open a build result corresponding to the build definition which you have set up the post-build deliver participant on. In the build result editor, switch to the "Logs" view. Expand a node called "<no_component>" and under that should be a log file called "build-#######.log". (The #'s will be unique for that log), Either way, you can look through all the logs and find one with a description (in the description column of the table) called "Full Build Log", this will be the log I'm talking about. (You should see lines in the log which start with "2013-11-18 00:44:04 [Jazz build engine]" to know it is the right log)

Also, just to make sure, the build definition also needs to have the "Jazz Source Control" pre-build participant added, otherwise there will be no build snapshot and the post- build deliver will not deliver anything.

You can get some additional information on the post-build deliver participant, and ways to use it here: https://jazz.net/library/article/649


David Lafreniere commented Nov 23 '13, 1:28 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

I forgot to comment on the part where you mentioned 'the selected deliver target is currently used in the build definition <x>. I assume you know this, but it's worthwhile to mention possibly for other readers of this post.

It's usually not recommended to have different build definitions with the same deliver target. If you do, each build definition must be delivering individual components, otherwise different one build could wipe out what another build just did. (In other words, do not use the checkbox in the editor called "deliver all components in the build workspace", instead, pick the individual components that each build should deliver such that they don't conflict with another build definition's post-build deliver.


Rainy John commented Nov 25 '13, 11:22 p.m.

I have installed RTC 4.0.2; In the build result editor, I don't see any 'logs'?


David Lafreniere commented Nov 26 '13, 9:52 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

The following image shows the Build Result editor, and where to find the build log.
Build Result editor showing the log to look at


Rainy John commented Nov 26 '13, 10:08 a.m.

I use RTC Eclipse

Ver 4.0.2 - Build id: RTC-I20130222-1633; Here I am not getting the "Logs" tab

 


David Lafreniere commented Nov 26 '13, 11:09 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

It is strange that your build is not publishing the build log back to the build result.
Perhaps check the JBE console output (this will indicate similar information that would be in the build log, and can indicate whether or not the Post-build Deliver is even run). Again, look for lines (shown below); these will indicate if the post-build deliver is 'started', and why it was not delivering the components.
2013-11-18 00:44:04 [Jazz build engine] Invoking post-build participant "com.ibm.team.build.autoDeliver" 2013-11-18 00:44:04 [Jazz build engine] Aborting post-build deliver. The current post-build deliver trigger policy is set to "NO_WARNINGS" and the build status is "ERROR".

You can also check the working directory for a any log file with the name of "build-<timestamp>.log". It is possible that the build is failing completely to the point of not even being able to publish the overall build log.


David Lafreniere commented Nov 26 '13, 11:09 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

I guess other questions that follows from this is are:
1. Are you builds completing green / successfully? If they are failing, then this may be a reason why the post-build deliver is not completing.
2. How exactly are you requesting your builds? (ex: A schedule in the Build Result is requesting builds, or you are manually requesting the builds in the RTC client, or through ant tasks, or some other integration such as Hudson/Jenkins, etc.);
3. What are your builds roughly doing, and how? Are they using mostly the pre/build/post build participants defined in the build definition, or do they rely mostly on ant tasks, or is there also some integration with some other tools, etc.
If anything else comes to mind, please let me know.
4. I also assume the component you are trying to deliver exists in the deliver target as well. Otherwise you need to either add it manually, or check off the "Add components to deliver if they do not exist in the deliver target" checkbox in the Post-build Deliver page.


Rainy John commented Nov 27 '13, 12:04 a.m.

Sorry, I didn't inform you that I am using Hudson/Jenkins engine and not Jazz Build engine..


Rainy John commented Nov 27 '13, 1:59 a.m.

Rainy John commented Nov 27 '13, 6:19 a.m.

David,

Answers for your previous question

1. Builds are successful (Moreover, I have selected 'Delover Always')

2. I use Hudson/Jenkins and through Poll SCM it triggers build

3. It uses pre/post build options of build definition. It accepts change sets from RTC, fetched into build work space, perform compilation, and E-mail notification is also triggered. After this, I want to deliver the change sets to another stream - that alone is not happening

4. Yes, it is available. But the component has an older baseline.

showing 5 of 12 show 7 more comments

One answer



permanent link
David Lafreniere (4.1k7) | answered Nov 27 '13, 9:28 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Ah thanks, you helped me identify the issue :)
I did not know that post-build steps added to a build definition are not run in the Hudson/Jenkins integration. (since they are part of Jazz Build Engine [JBE], and the Hudson/Jenkins integration doesn't use JBE). I'm not on the Build team, so I can't comment on the status of https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=277270 , however you should add a comment saying that this is needed functionality for you. If more people complain then it might be able to be put at a higher priority in the product backlog.

I see that there is a workaround mentioned in comment 6 of that work item which you can use in the meantime.

Your answer


Register or to post your answer.