It's all about the answers!

Ask a question

Unable to trigger a build with startTeamBuild


Marco Schett (324) | asked Nov 26 '14, 10:06 a.m.
 Hello,

I've creating two dependent Build Definitions.
My first definition contains a trigger for the second definition.
My requirement is to start the second definition on a dedicated Build Engine.
Therefore I decided to use the ANT Task  startTeamBuild.

So my first definition contains the following call:
    <startTeamBuild     repositoryAddress="${repositoryAddress}"
                   buildDefinitionId="main_definition"
                                   engineId="someEngine "
                   resultUUIDProperty="buildResultUUID"
                   label="CERT for nb2cm007"
                   autoComplete="false"
                   verbose="true" 
                                   userId="${BuildUser}"
                   passwordFile="${PasswordFile}"/>

The Build engine "someEngine" is only used for the "main_defintion". When I start now the first definition,
The main_definition is started one someEngine but it always ends in Abandoned state.

Error on from JBE: 

2014-11-26 12:50:57 [Jazz build engine] Abandoned orphaned build 'main_definition'. The build engine is about to process another build request and requires that all in-progress builds previously processed by this build engine be abandoned. Please see the build result's log for more information.

The Build log contains the following:

This build has been automatically abandoned by the build engine 'someEngine'.

This can happen if the build engine stops while it is processing a build, or if it fails to communicate with the server (e.g. due to the server crashing, or a network break).

As a result, the build is left in the in-progress state.


Such builds are automatically abandoned for the following reasons:

1. When the build engine is restarted, new builds will be processed, however the old builds would otherwise remain in the in-progress state indefinitely.

2. As a result the build engine would appear as busy when it is not.

When I do the same with requestTeamBuild it works. But there I cannot handover a engineID.

Has anyone an idea whats wrong here?

Regards,
Marco

One answer



permanent link
Spencer Murata (2.3k115971) | answered Dec 09 '14, 8:26 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The autocomplete is set to false, so the build will require an explicit buildComplete at the end of the build to actually close out the build, otherwise it will stay in the "in progress" state.  When you use the requestBuild, it will put itself into the build queue and hand off the lifecycle management of the build to the JBE, which usually closes itself out.  So my guess is that you need autocomplete = true, or make sure that the build will always finish with a completeBuild.

~Spencer

Comments
Marco Schett commented Dec 15 '14, 4:04 a.m.

 Hi Spencer,

thanks for the answer.
When I set autocomplete=true and add then as additional ANT parameters, my abandoned problem is gone.
The main_definition is now started on the right build engine.

But now the next problem occurs :-(

The main_definition runs about 800ms and reports success afterwards. But in reality, nothing is executed.
When I have a look in the build result, then the "Contribution Summary" section of the build result is empty.

Do you have another advise for me?

Regards, 
Marco

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.