[TASK] Let Bamboo check for clean TypeScript build 16/55716/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 14 Feb 2018 14:18:39 +0000 (15:18 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 15 Feb 2018 11:43:49 +0000 (12:43 +0100)
To avoid having stale TypeScript builds, Bamboo now recompiles every
TypeScript via grunt and checks for unwanted modifications.

Change-Id: I1d96bb81eff4d5c42332d0a27cce0a98a7d27478
Resolves: #83914
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/55716
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Build/bamboo/pom.xml
Build/bamboo/src/main/java/core/AbstractCoreSpec.java

index 8a8e054..757de5d 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>com.atlassian.bamboo</groupId>
     <artifactId>bamboo-specs-parent</artifactId>
-    <version>6.2.2</version>
+    <version>6.3.1</version>
     <relativePath/>
   </parent>
 
index 9dab9e1..abac094 100644 (file)
@@ -45,7 +45,7 @@ abstract public class AbstractCoreSpec {
     protected static String projectName = "TYPO3 Core";
     protected static String projectKey = "CORE";
 
-    protected String composerRootVersionEnvironment = "COMPOSER_ROOT_VERSION=9.0.0";
+    protected String composerRootVersionEnvironment = "COMPOSER_ROOT_VERSION=9.1.0";
 
     protected String testingFrameworkBuildPath = "vendor/typo3/testing-framework/Resources/Core/Build/";
 
@@ -593,7 +593,7 @@ abstract public class AbstractCoreSpec {
      */
     protected Job getJobLintScssTs() {
         return new Job("Lint scss ts", new BambooKey("LSTS"))
-            .description("Run npm lint in Build/ dir")
+            .description("Run npm lint, run npm run build-js")
             .pluginConfigurations(this.getDefaultJobPluginConfiguration())
             .tasks(
                 this.getTaskGitCloneRepository(),
@@ -610,7 +610,19 @@ abstract public class AbstractCoreSpec {
                     .description("Run npm lint")
                     .nodeExecutable("Node.js")
                     .workingSubdirectory("Build/")
-                    .command("run lint")
+                    .command("run lint"),
+                new NpmTask()
+                    .description("Run npm build-js")
+                    .nodeExecutable("Node.js")
+                    .workingSubdirectory("Build/")
+                    .command("run build-js"),
+                new ScriptTask()
+                    .description("git status to check for changed files after build-js")
+                    .interpreter(ScriptTaskProperties.Interpreter.BINSH_OR_CMDEXE)
+                    .inlineBody(
+                        this.getScriptTaskBashInlineBody() +
+                        "git status | grep -q \"nothing to commit, working directory clean\""
+                    )
             )
             .requirements(
                 new Requirement("system.imageVersion")