It's all about the answers!

Ask a question

Permission denied while invoking post-build participant


Makson Lee (41044241) | asked Feb 01 '12, 8:16 p.m.
Hi All,

We want to promote snapshot (or deliver baseline) from build workspace to target stream automatically, so we have the post-build deliver set in the build definition, but got the following error while a build was executed, at the moment, we found that there is just one baseline in the build workspace needed to delivered, so why a 'save stream' permission is needed?

2012-02-02 04:57:13 Invoking post-build participant "com.ibm.team.build.autoDeliver"
2012-02-02 04:57:13 Delivering components...
com.ibm.team.repository.common.PermissionDeniedException: 'Save Stream' failed. Permission denied.

Regards,
Makson

15 answers



permanent link
Makson Lee (41044241) | answered Feb 03 '12, 12:33 a.m.
If the post-build deliver is really a replace,
then the target stream cannot be the same stream from which the build
workspace accepts changes. It needs to be a separate stream that
normally gets changes only from the build, not from developers.


then the only purpose for 'Post-build Delivery' is to make a green stream.

Regards,
Makson

permanent link
Makson Lee (41044241) | answered Feb 03 '12, 4:16 a.m.
also, now i need to modify my build script to deliver baseline, but wait, baseline delivery is not supported by scm command ....

Regards,
Makson

permanent link
Nick Edgar (6.5k711) | answered Feb 03 '12, 9:24 a.m.
JAZZ DEVELOPER
> If the post-build deliver is really a replace,
then the target stream cannot be the same stream from which the build
workspace accepts changes.

Since the snapshot is taken at the time of the accept at the start of the build, there would be little benefit in pushing it back to the same stream. The target stream already has the changes. It could only lose changes. What are you really trying to do in this scenario? Is this the "run a personal build then deliver if OK" scenario? If so, we'd also need enhance it to support personal builds.

The main issue with a regular deliver is the handling of discards and conflicts.
In the work item Geoff filed he suggests simply failing the post-build deliver if there are conflicts. That doesn't seem unreasonable to me.

But what about discards? Say a developer "delivers a discard" after the start of the build, i.e. discards one or more change sets from his workspace, then does a component replace on the target stream. How should this be handled in the post-build deliver? Like a regular developer workspace, the build workspace will see this as an outgoing change, so a regular deliver would put the changes back in the stream.

It may be possible to take advantage of the snapshot taken at the start of the build in this case, e.g. to say "at the start of the build, these changes were in the stream, and now are not, so treat it as a discard and don't put them back", but that only works if the target stream is the same as the source stream.

For the personal build case, we'd also need to allow personal builds to create a snapshot (item 193979).

permanent link
Makson Lee (41044241) | answered Feb 05 '12, 9:16 p.m.
Hi Nick,

Yes, the delivery may take the discarded changes back, but one should know about this if he want a regular delivery.

Just like that the replacement may accidentally remove changes if someone (me?) don't know about 'Post-build Delivery' exactlly.

Please add a option to let us choose what we want to use.

Regards,
Makson

permanent link
Nick Edgar (6.5k711) | answered Feb 07 '12, 11:53 a.m.
JAZZ DEVELOPER
Ok, let's follow up in the work item. I would like to find a better way of dealing with deletions, and it would help to understand more about your scenario for that, so if you can provide more details in the work item that would help.

Your answer


Register or to post 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.