Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

buildLabel property is not set, why?

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.

0 votes



5 answers

Permanent link
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

0 votes


Permanent link
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.

0 votes


Permanent link

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

0 votes


Permanent link

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.

0 votes


Permanent link

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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 24 '11, 11:47 p.m.

Question was seen: 7,267 times

Last updated: May 24 '11, 11:47 p.m.

Confirmation Cancel Confirm