RTC + Jenkins: Why is a new snapshot always created?
- Conventional scenario of a Build Definition using a dedicated Build Repository Workspace;
- Using a Stream in the Build Definition instead of a Build Repository Workspace;
- Requesting a personal build from my personal Repository Workspace;
- Requesting a personal build from a Stream.
Supposing I have a snapshot on a Stream, and several changeset on top of it. If I request a build from that Stream, no snapshot is created, but what is getting actually built in this scenario?
Finally, in the item 1 above, a new snapshot is created even if there are no changesets to be accepted. Is there any other reason to create snapshots in this case?
Accepted answer
Comments
Hi Nick,
Thanks for your answer!
If I understood then, the relation between Build Result and Snapshots is always 1:[0..1], right?
We actually have a requirement in which we should achieve a N:1 relation, that is, if we build a project using an old snapshot, the Build Result should have a link to that old snapshot, which could, on the other hand, be referenced by several Build Results.
The purpose of this requirement is, first, to keep the traceability between Build Results; to know which ones were built using the same Snapshot.
Secondly, we have several product lines in which the same source is used, but every product uses a different configuration. So, the snapshot is "the common reference" between every Build Result.
I've tried several ways to link an existing Snapshot to a Build Result. But either the BR ended up linked to a new snapshot, or linked to no snapshot at all. I assume this requirement is not possible to achieve then...
Interesting scenario. Since 5.0, we have the snapshotPublisher Ant task that allows the snapshot contribution for the build to be updated. This was added to support the use case where the build itself delivers changes back to the stream, and you want to include those in the (new) snapshot for the build.
If I create a new Repository Workspace from a Snapshot via RTC client, and run a personal build against it, the resulting Build Result will not have a link to the Snapshot that generated the Repository Workspace first place.
Is it the same behavior of using the SCM CLI?
(note: in our company we are still using the 4.0.6 until the end of the year.)
Yes, that's correct. It's also possible to do some of these things using scripting, e.g. see https://jazz.net/wiki/bin/view/Main/GroovyScripting
1 vote