Welcome to the Jazz Community Forum
strange build numbering using RTC and BF together

Hi folks,
I am working with a client that has BF (7.1.3) and RTC 3.0.1 integrated together.
They have created build definitions that use BF as the engine.
However, when they have their build set up in a continuous integration fashion, they are getting odd build numbering.
When the build kicks off in RTC, it launches the BF project. The RTC/BF adapter queries the RTC stream to see if there are any changes and if so, executes the build. If there are no changes, it shuts down the project.
However, when there are NO changes, the BF build ID seems to get consumed anyway. It is not recycled.
so they get build results like this:
Attempt 1<there> Build ID = build_1
Attempt 2<there> Adapter shuts down build
Attempt 3<there> Adapter shuts down build
Attempt 4<there> Build ID = build_4
Prior experiments with using the ClearCase adapter results in the build forge build ID being recycled if there are no changes.
Can anyone explain why build IDs 2 and 3 are consumed when using Build Forge as a build engine with RTC?
Thanks
Andy
I am working with a client that has BF (7.1.3) and RTC 3.0.1 integrated together.
They have created build definitions that use BF as the engine.
However, when they have their build set up in a continuous integration fashion, they are getting odd build numbering.
When the build kicks off in RTC, it launches the BF project. The RTC/BF adapter queries the RTC stream to see if there are any changes and if so, executes the build. If there are no changes, it shuts down the project.
However, when there are NO changes, the BF build ID seems to get consumed anyway. It is not recycled.
so they get build results like this:
Attempt 1<there> Build ID = build_1
Attempt 2<there> Adapter shuts down build
Attempt 3<there> Adapter shuts down build
Attempt 4<there> Build ID = build_4
Prior experiments with using the ClearCase adapter results in the build forge build ID being recycled if there are no changes.
Can anyone explain why build IDs 2 and 3 are consumed when using Build Forge as a build engine with RTC?
Thanks
Andy
3 answers

Hi Andy,
From the screen shot, it looks like the builds are being driven by the RTC build definition's schedule. In that case the BF build is kicked off from RTC, not based on BF's schedule. I wonder whether that makes a difference.
Which adaptor is being used here? JazzJBE.xml, or some other one? If using JazzJBE.xml, if JBE detects that there are no changes to build, it prints an "RC=2" code, which the adaptor detects with:
<match pattern="RC\=">
<setenv name="Delete" value="TRUE" type="temp append\n" />
</match>
It then picks up on the Delete env var and fails the step and sets a special env property indicating the build should be deleted.
<ontempenv name="Delete" state="hastext">
<step result="FAIL" />
<setenv name="_CI_BUILD_DELETE" value="1"/>
</ontempenv>
It would be worth checking how the ClearCase adapter handles the "nothing to build" case, and how that's signalled to BF.
From the screen shot, it looks like the builds are being driven by the RTC build definition's schedule. In that case the BF build is kicked off from RTC, not based on BF's schedule. I wonder whether that makes a difference.
Which adaptor is being used here? JazzJBE.xml, or some other one? If using JazzJBE.xml, if JBE detects that there are no changes to build, it prints an "RC=2" code, which the adaptor detects with:
<match pattern="RC\=">
<setenv name="Delete" value="TRUE" type="temp append\n" />
</match>
It then picks up on the Delete env var and fails the step and sets a special env property indicating the build should be deleted.
<ontempenv name="Delete" state="hastext">
<step result="FAIL" />
<setenv name="_CI_BUILD_DELETE" value="1"/>
</ontempenv>
It would be worth checking how the ClearCase adapter handles the "nothing to build" case, and how that's signalled to BF.

1Do you create adaptor link?
2, Do you set the RunLink=Yes or select it
as you know, when you run job from buildforge, you need to select the checkbox to run the runlink.
i am not sure if there is a option in RTC build definition to select it
how to locate the issue
1 run you project from Buildforge(run it in browser)
if the adaptor fails, the build tag is consumed, that's the build forge issue
if not, that's the RTC build definition issue
2, Do you set the RunLink=Yes or select it
as you know, when you run job from buildforge, you need to select the checkbox to run the runlink.
i am not sure if there is a option in RTC build definition to select it
how to locate the issue
1 run you project from Buildforge(run it in browser)
if the adaptor fails, the build tag is consumed, that's the build forge issue
if not, that's the RTC build definition issue
Hi folks,
I am working with a client that has BF (7.1.3) and RTC 3.0.1 integrated together.
They have created build definitions that use BF as the engine.
However, when they have their build set up in a continuous integration fashion, they are getting odd build numbering.
When the build kicks off in RTC, it launches the BF project. The RTC/BF adapter queries the RTC stream to see if there are any changes and if so, executes the build. If there are no changes, it shuts down the project.
However, when there are NO changes, the BF build ID seems to get consumed anyway. It is not recycled.
so they get build results like this:
Attempt 1<there> Build ID = build_1
Attempt 2<there> Adapter shuts down build
Attempt 3<there> Adapter shuts down build
Attempt 4<there> Build ID = build_4
Prior experiments with using the ClearCase adapter results in the build forge build ID being recycled if there are no changes.
Can anyone explain why build IDs 2 and 3 are consumed when using Build Forge as a build engine with RTC?
Thanks
Andy

Eric, as shown above, the adaptor does fail the step for the RC=2 case (no changes to build). We also set the _CI_BUILD_DELETE flag. Is this the correct way to signal to BF that a build is not needed? Is there a better way to do this, such that no tag gets consumed when there are no changes to build?