Question

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:

  1. When project 'A' is forced, it builds project B, if B is successful, it builds C. This works fine.
  2. When project 'A' is forced, it builds project 'B', if B fails, it builds C. This is also fine in my case.
  3. Now after number 2 scenario and bug are fixed in Project B; if project A is forced once more and project B displays a cruise status of 'fixed', it DOES NOT build C. This is NOT fine?

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.

Was it helpful?

Solution

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>

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top