5.22.2. Wait for the termination of Jenkins Jobs

<< Click to Display Table of Contents >>

Navigation:  5. Detailed description of the Actions > 5.22. TA - Distributed Computations >

5.22.2. Wait for the termination of Jenkins Jobs

 

Icon: ANATEL~4_img339

 

Function: waitJenkins

 

Property window:
 

clip0285

 
Short description:

 

Wait for the completion of Anatella Jobs running in Jenkins.

 

Long Description:

 

The ANATEL~4_img321 “Loop Jenkins” action (see section 5.22.1) does not wait for the completion of the execution of the Anatella graphs running inside Jenkins. You can use the ANATEL~4_img339 waitJenkins action to wait for the completion of the graphs running inside Jenkins.

 

The combination of the ANATEL~4_img321 loopJenkins action and the ANATEL~4_img339 waitJenkins action allows to obtain a behavior similar to the ANATEL~4_img273 loopAnatellaGraphAdv action (see section 5.21.6.), the ANATEL~4_img269 loopAnatellaGraph (see section 5.21.5) action or the ANATEL~4_img262 ParallelRun Action (see section 5.3.3.) that are waiting for the executed (sub-) graphs to terminate before proceeding any further.

 

All the Anatella jobs that were added inside Jenkins using the ANATEL~4_img321 loopJenkins action are uniquely identified through an “_Anatella_Job_ID”. This “_Anatella_Job_ID” is given as output of the ANATEL~4_img321 loopJenkins action: For example:

 

clip0286

 
The ANATEL~4_img339 waitJenkins action is waiting for the completion of all the jobs whose “_Anatella_Job_ID” is given on the input pin (specified using the Parameter P1). If Anatella sees an un-finished job X, it re-contacts Jenkins at regular intervals (this procedure is named “polling”), to know if the job X is finally finished. The delay between 2 “contacts” (i.e. the “polling interval”) is the Parameter P2 (in seconds). After Y “contacts” (i.e. after Y “polling” - Y is Parameter P3), Anatella will display inside the low window some statistics: For example (when Parameter P3>0), you’ll see inside the Log Window:

 

Running... (10/5/18 16:54:04)

#Total=2 ; #Pending=2 (#Running=1 ; #InQueue=1) ; #Complete=0 (#Success=0 ; #QueryFailure=0 ; #Fail=0)

#Total=2 ; #Pending=2 (#Running=1 ; #InQueue=1) ; #Complete=0 (#Success=0 ; #QueryFailure=0 ; #Fail=0)

#Total=2 ; #Pending=1 (#Running=1 ; #InQueue=0) ; #Complete=1 (#Success=1 ; #QueryFailure=0 ; #Fail=0)

#Total=2 ; #Pending=1 (#Running=1 ; #InQueue=0) ; #Complete=1 (#Success=1 ; #QueryFailure=0 ; #Fail=0)

#Total=2 ; #Pending=0 (#Running=0 ; #InQueue=0) ; #Complete=2 (#Success=2 ; #QueryFailure=0 ; #Fail=0)

 

Interactive Run: Success!(finished at 10/5/18 16:54:36 after 31.68 seconds - Peak Memory Consumption: 144 MB)

 

As ouput of the ANATEL~4_img339 waitJenkins action, you get a table that gives you the final status of the monitored jobs. For example:

 

clip0287

 

If the final job status (displayed inside the “_JenkinsFinalJobStatus” column here: number1 )  is “Query Error: Build Information is too old and has been discarded by Jenkins”, it means that you have to increase the value of the Jenkins configuration parameter named “Days to keep builds”: See the section 5.21.1.1 (and more precisely the step 1.6) to kown how to do so.