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

Captuing Adaptor Data Before it Disappears

I have a custom Build Forge SCM adaptor that captures all CMVC tracks in (fix','integrate','build') state, and puts this data into an adaptor setenv variable named "buildableTracks".

I am sourcing the adaptor from the first step of the project.

The scope of the "buildableTracks" variable is limited to the lifetime of the adaptor run. I would like to transfer this data to a project environment variable that will persist for the life of the project.

Is there a way to use a dot command, perhaps .bset, that will transfer this data to the project's environment once the adaptor exits? Or can registers be used?

Thanks,

--Randy

0 votes



4 answers

Permanent link
I have a custom Build Forge SCM adaptor that captures all CMVC tracks in (fix','integrate','build') state, and puts this data into an adaptor setenv variable named "buildableTracks".

I am sourcing the adaptor from the first step of the project.

The scope of the "buildableTracks" variable is limited to the lifetime of the adaptor run. I would like to transfer this data to a project environment variable that will persist for the life of the project.

Is there a way to use a dot command, perhaps .bset, that will transfer this data to the project's environment once the adaptor exits? Or can registers be used?

Thanks,

--Randy


Hi,

If you're in an adaptor and want something similar to a .bset, you can use setenv, but it should not include a group attribute. For example,


<setenv name="TEST_PROPERTY" value="FromAdaptor_$2"/>


If you have a step that does a .source of the adaptor with a line like the one above, then the TEST_PROPERTY will be available in subsequent steps for that build.

If you want more a .set in an adaptor, you can use the setenv but will need to include the group attribute. The variable being set needs to already exist in the environment group.

Brent Ulbricht
RTC Build Lead

0 votes


Permanent link
Thanks Brent,

Thanks for your response.

I implemented your suggestion and it worked.

Would there be any interest at BF in publishing my custom CMVC adaptor with the next release? A lot of time was spent reworking the out-of-the-box CMVC adaptor, and it has been thoroughly tested by hundreds of my internal build customers.

FYI, it has these interfaces:

interface name="CommitLevel"
interface name="CompleteLevel"
interface name="ExtractFiles"
interface name="ExtractComponent"
interface name="LevelExtract"
interface name="BuildByLevel"

and automatically processes the .gone file.

--Randy

0 votes


Permanent link
Hi, Randy. Thanks for your interest in contributing your CMVC adaptor. Given the IBM-internal nature of CMVC, I'm not sure we would ship it with the product directly. I have been wanting to set up a contribution repository where users of Build Forge could share adaptors, libraries, etc. Once we figure out where and how to do that, I think this would make a great contribution there.

If you have any questions, feel free to email me.

Charles Rankin
Build Forge Architect

0 votes


Permanent link
Hi,

I have a new twist to my question.

The solution provided does indeed populate a "Standard" Environment Variable.

But what I really want is a "Pulldown" Environment Variable.

Oddly, when I start the process with a Standard Env var, the data is returned perfectly. If I then convert the variable to a Pulldown -- without running the adaptor -- the data is nicely displayed as expected. However, rerunning the project/adaptor does not update the Pulldown. The values in the Pulldown are stale.

In order to see any updates from the next adaptor run, I need to change the variable back to "Standard"; re-run the project (which correctly updates the Standard variable, followed by converting the Standard to a Pulldown.

Bottom line: Is it possible to populate a Pulldown Env variable from the adaptor without going through the Standard step first?

--Randy

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: Jul 26 '11, 5:02 p.m.

Question was seen: 5,002 times

Last updated: Jul 26 '11, 5:02 p.m.

Confirmation Cancel Confirm