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

BF7.1.2.1 variable expansion issue with scheduled job

In my project, I have a .scan baseline step after the checkout step. In that step, I use the variable %RELDIR% which has the value ROOT\SUB1\${B}_${BF_D}_${BF_T}.

It works fine when I manually run the job. But when I schedule the job, the ${B} does not expand properly. For example, the RELDIR sets to: ROOT\SUB1\B_101209_091624.

As you can see, the variable ${BF_D} and ${BF_T} gets expanded properly, but the ${B} does not. Since my system is windows, I tried with %B% also, but still no luck.

0 votes



2 answers

Permanent link
In my project, I have a .scan baseline step after the checkout step. In that step, I use the variable %RELDIR% which has the value ROOT\SUB1\${B}_${BF_D}_${BF_T}.

It works fine when I manually run the job. But when I schedule the job, the ${B} does not expand properly. For example, the RELDIR sets to: ROOT\SUB1\B_101209_091624.

As you can see, the variable ${BF_D} and ${BF_T} gets expanded properly, but the ${B} does not. Since my system is windows, I tried with %B% also, but still no luck.


so when the variables are being expanded, $B isn't defined. I'd suggest opening a PMR as this appears to be a defect in environment expansion in a scheduled job.

As a workaround, you could create an early step that does
  .bset env "RELDIR=ROOT\SUB1\${B}_${BF_D}_${BF_T}"

this would move the expansion of those environment variables into project execution time rather than project start (which is handled by different code for scheduled project start).

0 votes


Permanent link
Thank you for the response.

In all my projects, the 1st step is the adapter step, which checks out the code from source control. The 2nd step is the inline step which does the scan baseline.

I have tried
1) insert the .bset before the 1st step,
2)between 1st and 2nd step
3)inside the inline library before the scan baseline.

Non of them worked, B is always not defined. In case 1), the scheduled build passed, but the resulting RELDIR still have the literal B in it, instead of the actual build number. In cases 2) and 3), the scheduled build failed.

Thanks.


In my project, I have a .scan baseline step after the checkout step. In that step, I use the variable %RELDIR% which has the value ROOT\SUB1\${B}_${BF_D}_${BF_T}.

It works fine when I manually run the job. But when I schedule the job, the ${B} does not expand properly. For example, the RELDIR sets to: ROOT\SUB1\B_101209_091624.

As you can see, the variable ${BF_D} and ${BF_T} gets expanded properly, but the ${B} does not. Since my system is windows, I tried with %B% also, but still no luck.


so when the variables are being expanded, $B isn't defined. I'd suggest opening a PMR as this appears to be a defect in environment expansion in a scheduled job.

As a workaround, you could create an early step that does
  .bset env "RELDIR=ROOT\SUB1\${B}_${BF_D}_${BF_T}"

this would move the expansion of those environment variables into project execution time rather than project start (which is handled by different code for scheduled project start).

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: Dec 08 '10, 10:02 a.m.

Question was seen: 4,203 times

Last updated: Dec 08 '10, 10:02 a.m.

Confirmation Cancel Confirm