Reputation: 1306
I have three projects in question, lets call them A, B and C. Where 'A' just prepares a cetain build scenario for B, which is the main build. C cleans up the scenario and basically resets B to its original state. I have set these projects in the same queue, and tested this process for the most part works excecpt when Project B fails. Here is the situation, which is explained below.
<project name="A" queue="main">
<publishers>
<email status of build/>
<forcebuild>
<project>B</project>
</forcebuild>
<forcebuild>
<project>C</project>
</forcebuild>
</publishers>
<task>Prepares special scenario</task>
</project>
<project name="B" queue="main">
<publishers>
</publishers>
<task>Builds main project</task>
</project>
<project name="C" queue="main">
<publishers>
</publishers>
<task>Resets special scenario</task>
</project>
Scenarios:
Can anyone see that reason why project C will not build if a combination of No.2 and No.3 is happens? Any help or direction is welcomed.
Thanks.
Upvotes: 0
Views: 158
Reputation: 1214
Can project A
be responsible for cleaning up the current state and preparing for the new build.
Say for example there was a power failure part way through B
's build. In this configuration you would need to manually force C
to be able to run the build process?
If A
runs the same tasks as C
, then as own task, this would remove this problem and yours too I believe.
Upvotes: 1
Reputation: 3117
You should always clean up your test environment after you are done with it. I would recommend using the project trigger for project C and set it up something akin to the following. This will allow C to always run if A is successful (can be changed by modifying the project trigger in C).
<project name="A" queue="main">
<publishers>
<email status of build/>
<forcebuild>
<project>B</project>
</forcebuild>
</publishers>
<tasks>Prepares special scenario</tasks>
</project>
<project name="B" queue="main">
...
</project>
<project name="C" queue="main">
<triggers>
<projectTrigger project="A" />
</triggers>
<publishers />
<tasks>Resets special scenario</tasks>
</project>
Upvotes: 1