[TASK] bamboo: Include php 7.2 in test suite 09/54909/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 2 Dec 2017 22:15:34 +0000 (23:15 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Dec 2017 17:38:30 +0000 (18:38 +0100)
Add php 7.2 to 8.7 test suite:
* pre-merge: acceptance, integration, functionals on any PHP agent 7.x
* pre-merge: distinct 7.0, 7.1, 7.2 jobs for php unit tests and php linting
* nightly: distinct 7.0, 7.1, 7.2 jobs for all tests

Change-Id: I8ad609e1cb2dc66162d642b5428bbf5a74d3bf36
Resolves: #83193
Releases: 8.7
Reviewed-on: https://review.typo3.org/54909
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Build/bamboo/src/main/java/core/AbstractCoreSpec.java
Build/bamboo/src/main/java/core/NightlySpec.java
Build/bamboo/src/main/java/core/PreMergeSpec.java

index 8c7a67f..b107551 100644 (file)
@@ -479,9 +479,7 @@ abstract public class AbstractCoreSpec {
                     )
             )
             .requirements(
-                new Requirement("system.phpVersion")
-                    .matchValue("7\\.0|7\\.1")
-                    .matchType(Requirement.MatchType.MATCHES)
+                this.getRequirementPhpVersion70Or71Or72()
             )
             .cleanWorkingDirectory(true);
     }
@@ -515,9 +513,7 @@ abstract public class AbstractCoreSpec {
                     .resultDirectories("typo3temp/var/tests/*")
             )
             .requirements(
-                new Requirement("system.phpVersion")
-                    .matchValue("7\\.0|7\\.1")
-                    .matchType(Requirement.MatchType.MATCHES)
+                this.getRequirementPhpVersion70Or71Or72()
             )
             .artifacts(
                 new Artifact()
@@ -826,6 +822,15 @@ abstract public class AbstractCoreSpec {
     }
 
     /**
+     * Requirement for php 7.2
+     */
+    protected Requirement getRequirementPhpVersion72() {
+        return new Requirement("system.phpVersion")
+            .matchValue("7.2")
+            .matchType(Requirement.MatchType.EQUALS);
+    }
+
+    /**
      * Requirement for php 7.0 or 7.1
      */
     protected Requirement getRequirementPhpVersion70Or71() {
@@ -835,6 +840,15 @@ abstract public class AbstractCoreSpec {
     }
 
     /**
+     * Requirement for php 7.0 or 7.1 or 7.2
+     */
+    protected Requirement getRequirementPhpVersion70Or71Or72() {
+        return new Requirement("system.phpVersion")
+            .matchValue("7\\.0|7\\.1|7\\.2")
+            .matchType(Requirement.MatchType.MATCHES);
+    }
+
+    /**
      * A bash header for script tasks forking a bash if needed
      */
     protected String getScriptTaskBashInlineBody() {
index 78f8515..e4d44a1 100644 (file)
@@ -42,7 +42,7 @@ public class NightlySpec extends AbstractCoreSpec {
     protected int numberOfFunctionalMysqlJobs = 6;
     protected int numberOfFunctionalMssqlJobs = 6;
     protected int numberOfFunctionalPgsqlJobs = 6;
-    protected int numberOfUnitRandomOrderJobs = 4;
+    protected int numberOfUnitRandomOrderJobs = 2;
 
     /**
      * Run main to publish plan on Bamboo
@@ -79,12 +79,15 @@ public class NightlySpec extends AbstractCoreSpec {
 
         jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobCglCheckFullCore());
 
@@ -92,25 +95,31 @@ public class NightlySpec extends AbstractCoreSpec {
 
         jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobUnitJavaScript());
 
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobLintScssTs());
 
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         Stage stageMainStage = new Stage("Main stage")
             .jobs(jobsMainStage.toArray(new Job[jobsMainStage.size()]));
@@ -165,7 +174,7 @@ public class NightlySpec extends AbstractCoreSpec {
                     )
             )
             .requirements(
-                this.getRequirementPhpVersion70Or71()
+                this.getRequirementPhpVersion70Or71Or72()
             )
             .cleanWorkingDirectory(true);
     }
index 819ecd2..6ea6e9c 100644 (file)
@@ -50,7 +50,7 @@ public class PreMergeSpec extends AbstractCoreSpec {
     protected int numberOfFunctionalMysqlJobs = 10;
     protected int numberOfFunctionalMssqlJobs = 10;
     protected int numberOfFunctionalPgsqlJobs = 10;
-    protected int numberOfUnitRandomOrderJobs = 2;
+    protected int numberOfUnitRandomOrderJobs = 1;
 
     /**
      * Run main to publish plan on Bamboo
@@ -88,31 +88,34 @@ public class PreMergeSpec extends AbstractCoreSpec {
         // MAIN stage
         ArrayList<Job> jobsMainStage = new ArrayList<Job>();
 
-        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70Or71(), "PHP7071"));
-        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion70Or71(), "PHP7071"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
 
-        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
 
         jobsMainStage.add(this.getJobIntegrationVarious());
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion70Or71(), "PHP7071"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
 
         jobsMainStage.add(this.getJobUnitJavaScript());
 
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobLintScssTs());
 
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion70(), "PHP70"));
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion71(), "PHP71"));
+        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         Stage stageMainStage = new Stage("Main stage")
             .jobs(jobsMainStage.toArray(new Job[jobsMainStage.size()]));
@@ -206,9 +209,7 @@ public class PreMergeSpec extends AbstractCoreSpec {
                     )
             )
             .requirements(
-                new Requirement("system.phpVersion")
-                    .matchValue("7\\.0|7\\.1")
-                    .matchType(Requirement.MatchType.MATCHES)
+                this.getRequirementPhpVersion70Or71Or72()
             )
             .cleanWorkingDirectory(true);
     }