[TASK] bamboo: Have cgl check in preparation stage 13/53313/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 22 Jun 2017 17:50:30 +0000 (19:50 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 23 Jun 2017 10:34:12 +0000 (12:34 +0200)
The cgl check is quick and fails rather often for pre-merge
test runs in the beginning. Move the job to preparation stage
for quicker test runs in those cases.

Change-Id: Id73f93212d12e47fb2897893c2ea518aa6900888
Resolves: #81683
Releases: master
Reviewed-on: https://review.typo3.org/53313
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Build/bamboo/src/main/java/core/PreMergeSpec.java

index b33d2e0..6505aaf 100644 (file)
@@ -68,30 +68,17 @@ public class PreMergeSpec extends AbstractCoreSpec {
         ArrayList<Job> jobsPreparationStage = new ArrayList<Job>();
 
         // Label task
-        Job jobLabel = new Job("Create build labels", new BambooKey("CLFB"))
+        jobsPreparationStage.add(new Job("Create build labels", new BambooKey("CLFB"))
             .description("Create changeId and patch set labels from variable access and parsing result of a dummy task")
             .tasks(
                 new ScriptTask()
                     .interpreter(ScriptTaskProperties.Interpreter.BINSH_OR_CMDEXE)
                     .inlineBody("echo \"I'm just here for the labels!\"")
-            );
-        jobsPreparationStage.add(jobLabel);
-
-        jobsPreparationStage.add(this.getJobComposerValidate());
-
-        Stage stagePreparation = new Stage("Preparation")
-            .jobs(jobsPreparationStage.toArray(new Job[jobsPreparationStage.size()]));
-
-
-        // MAIN stage
-        ArrayList<Job> jobsMainStage = new ArrayList<Job>();
-
-        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70Or71(), "PHP7071"));
-
-        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+            )
+        );
 
         // CGL check last commit
-        jobsMainStage.add(new Job("Integration CGL", new BambooKey("CGLCHECK"))
+        jobsPreparationStage.add(new Job("Integration CGL", new BambooKey("CGLCHECK"))
             .description("Check coding guidelines by executing Build/Scripts/cglFixMyCommit.sh script")
             .tasks(
                 this.getTaskGitCloneRepository(),
@@ -112,6 +99,19 @@ public class PreMergeSpec extends AbstractCoreSpec {
             )
         );
 
+        jobsPreparationStage.add(this.getJobComposerValidate());
+
+        Stage stagePreparation = new Stage("Preparation")
+            .jobs(jobsPreparationStage.toArray(new Job[jobsPreparationStage.size()]));
+
+
+        // MAIN stage
+        ArrayList<Job> jobsMainStage = new ArrayList<Job>();
+
+        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70Or71(), "PHP7071"));
+
+        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+
         jobsMainStage.add(this.getJobIntegrationVarious());
 
         jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));