It's all about the answers!

Ask a question

buildLabel property is not set, why?


Joef Huang (46114) | asked May 24 '11, 11:47 p.m.
Hello,

When echoing the "buildLabel" property in our Ant script (which is invoked from build definition), the value returned is "${buildLabel}". So apparently it is not set by the build engine.

But the document says it should have time stamp as the value in the format such as "20080215-1234".

How can we make the "buildLabel" property work as expected?

Thanks.

5 answers



permanent link
Brent Ulbricht (2.5k11) | answered May 25 '11, 9:25 a.m.
JAZZ DEVELOPER
Hello,

When echoing the "buildLabel" property in our Ant script (which is invoked from build definition), the value returned is "${buildLabel}". So apparently it is not set by the build engine.

But the document says it should have time stamp as the value in the format such as "20080215-1234".

How can we make the "buildLabel" property work as expected?

Thanks.


Hi,

What kind of build definition template are you using (does it run through the JBE)?

Brent Ulbricht
Developer/Lead - RTC Build

permanent link
Joef Huang (46114) | answered May 25 '11, 9:37 a.m.
Hello,

When echoing the "buildLabel" property in our Ant script (which is invoked from build definition), the value returned is "${buildLabel}". So apparently it is not set by the build engine.

But the document says it should have time stamp as the value in the format such as "20080215-1234".

How can we make the "buildLabel" property work as expected?

Thanks.


Hi,

What kind of build definition template are you using (does it run through the JBE)?

Brent Ulbricht
Developer/Lead - RTC Build

Hello,

I am running PDE build, so I am using the "Command Line" template per the document.

And yes, it ran through the JBE (I started JBE in a DOS command window, and invoked the build definition from RTC Eclipse client UI)

Thanks.

permanent link
Brent Ulbricht (2.5k11) | answered May 25 '11, 1:17 p.m.
JAZZ DEVELOPER

Hello,

I am running PDE build, so I am using the "Command Line" template per the document.

And yes, it ran through the JBE (I started JBE in a DOS command window, and invoked the build definition from RTC Eclipse client UI)

Thanks.


Hi,

If you're using the 'Command Line - Jazz Build Engine' template, then you'll need make sure that in the 'Environment variables' section that the radio dial for 'Add build properties to native environment' is selected on the command line tab. When you invoke Ant, you'll need to pass in the buildLabel by using a -DbuildLabel=%buildLabel% (Windows) or -DbuildLabel=$buildLabel (Unix).

Brent Ulbricht
Developer/Lead - RTC Build

permanent link
Joef Huang (46114) | answered May 25 '11, 1:28 p.m.

Hello,

I am running PDE build, so I am using the "Command Line" template per the document.

And yes, it ran through the JBE (I started JBE in a DOS command window, and invoked the build definition from RTC Eclipse client UI)

Thanks.


Hi,

If you're using the 'Command Line - Jazz Build Engine' template, then you'll need make sure that in the 'Environment variables' section that the radio dial for 'Add build properties to native environment' is selected on the command line tab. When you invoke Ant, you'll need to pass in the buildLabel by using a -DbuildLabel=%buildLabel% (Windows) or -DbuildLabel=$buildLabel (Unix).

Brent Ulbricht
Developer/Lead - RTC Build


Thanks for the response.

But I don't see a radio dial for "Add build propertie to native environment" on the command line tab of the build definition editor.

BTW: I am on RTC 2.0.0.2 client.

Any other suggestions?

Thanks.

permanent link
Brent Ulbricht (2.5k11) | answered Jun 04 '11, 3:04 p.m.
JAZZ DEVELOPER

Hello,

I am running PDE build, so I am using the "Command Line" template per the document.

And yes, it ran through the JBE (I started JBE in a DOS command window, and invoked the build definition from RTC Eclipse client UI)

Thanks.


Hi,

If you're using the 'Command Line - Jazz Build Engine' template, then you'll need make sure that in the 'Environment variables' section that the radio dial for 'Add build properties to native environment' is selected on the command line tab. When you invoke Ant, you'll need to pass in the buildLabel by using a -DbuildLabel=%buildLabel% (Windows) or -DbuildLabel=$buildLabel (Unix).

Brent Ulbricht
Developer/Lead - RTC Build


Thanks for the response.

But I don't see a radio dial for "Add build propertie to native environment" on the command line tab of the build definition editor.

BTW: I am on RTC 2.0.0.2 client.

Any other suggestions?

Thanks.

Hi,

The build definition for the command line build in 2.0.0.2 doesn't have the options to add the build properties to the native environment. We'll have to go about this another way. I would specify a known location for the 'Properties file' field on the 'Command Line' tab. Then in your Ant build file, you can use the Ant 'loadproperties' task to load the properties from the location that you specified.

 <target name="test">

<loadproperties srcFile="C:\temp\fetched\proj1\build.properties"/>
<echo message="********* ${buildLabel} *************"/>
</target>


Brent Ulbricht
Developer/Lead - RTC Build

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.