team_scm_snapshotUUID Environment Variable Overwritten when Loading Jenkins Pipeline Library
![]() We are running into an issue where the build's
We have worked around the issue by using the
library
pipeline step (which is evaluated at runtime) instead of the
@Library
annotation which is evaluated at compile time. Our workaround in our pipeline script is as follows:
// Store the build's snapshot UUID before loading the library
This workaround resolves the issue. It would be nice to not need the workaround. That way, the compile-time checks that come with
@Library
could be utilized. Any thoughts as to whether this issue would be feasible to fix in the Jenkins Team Concert Plugin implementation?
|
2 answers
![]() Hi Kirk,
Comments Thanks. I read through the wiki post and I think that would solve the problem. Next time we have an opportunity to update our build code, I will give it a try.
We've since worked around the issue by using the RTC web API. Instead of using the team_scm_snapshotUUID property, we hit the web API passing the build result UUID. This call gives us the build details back. We parse through those build details using some Ruby and are able to get the snapshot UUID. It is somewhat involved, but works.
The workaround that you pointed out seems a lot simpler, though! I'll give it a try when I have an opportunity to do so.
|