It's all about the answers!

Ask a question

Understanding of build process and creation of baselines


Oliver Steinbrecher (15156) | asked Oct 10 '13, 5:17 a.m.
 Hey,

i'm using a build definition which makes use of the ant property "buildResultUUID". In my understanding this is a generated unique ID for a specific build. When the build starts this id is generated and will be used for creating the the new baseline of my components. Then the id looks like  'MyApp_Build_20130723-1419'.

When i change my build configuration thus no 'Jazz Source Control' actions are performed the id looks like 'PersonalBuild_7VSEoTEKEeOvC6Cj8ZlcOA'.  What is the explanation for this behavior

Kind Regards

Oliver

One answer



permanent link
Nick Edgar (6.5k711) | answered Oct 10 '13, 7:30 a.m.
JAZZ DEVELOPER
edited Oct 10 '13, 7:45 a.m.
Hi Oliver.  The buildResultUUID Ant property is the unique item ID for the build (e.g. "7VSEoTEKEeOvC6Cj8ZlcOA"), passed along by JBE when it invokes Ant.  JBE also sets other properties: buildDefinitionId (e.g. "MyApp_Build"), buildLabel (e.g. "20130723-1419"), and several others.  Build definition ids are unique in a given repository. Build labels are not unique, e.g. if multiple builds are started in the same minute.
A build definition's id can be changed, and so can a build's label, but item IDs are unchangeable for the lifetime of the item. 
You can configure the Ant step in the build definition to output a properties file to see all the properties.

As for 'PersonalBuild_7VSEoTEKEeOvC6Cj8ZlcOA', I'm not sure how that's being generated.  It looks like a combination of the buildDefinitionId and the buildResultUUID.  JBE forms the snapshot label from the buildDefinitionId and the buildLabel (at the end of the SCM accept activity, before invoking Ant), not the buildResultUUID.  Is it possible there's a property in the build definition (or engine) overriding buildLabel and substituting in the buildResultUUID (e.g. buildLabel = "${buildResultUUID}" ?

If it's a personal build, where do you get this string from?  Snapshots are not created for personal builds.  I guess it must be the id of the build definition.  Also, if you removed the Jazz Source Control option, it wouldn't be doing the SCM accept/fetch, so wouldn't create a snapshot.

It's possible the relevant properties are being set in the Ant script, e.g. if the script sets the relevant property to be "${buildDefinitionId}_${buildResultUUID}" that would be used unless it was already defined when Ant was invoked, e.g. if the property was set in the build definition or engine.  Usually Ant properties are set at most once, with the earliest one taking precedence (i.e. they're designed to be immutable, not variables, so -D or -propertiesFile args on the command line take precedence over properties hardwired in the script).

I suggest comparing the properties between the two build definitions, and using that option to generate a .properties file to debug the problem.

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.