From a5efad31a683020e2238ec0670919c710a0fb489 Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Mon, 27 Nov 2017 10:23:05 +0100
Subject: [PATCH] [BUGFIX] bamboo: Label parsing

The bamboo test setup relies on a funny solution to determine the
gerrit patch id and patch set, used for reporting results back
to gerrit.

The regex based solution started behaving weird with latest
bamboo versions and is now quoted slightly differently to fix that.

Special thanks to atlassian support for being friendly, helpful,
quick and providing a working solution to our issue.

Change-Id: I51ec85be2133033777fac8ff1f12071a81c71efc
Resolves: #83107
Releases: master, 8.7, 7.6
Reviewed-on: https://review.typo3.org/54774
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                              | 2 +-
 Build/bamboo/src/main/java/core/PreMergeSpec.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Build/bamboo/pom.xml b/Build/bamboo/pom.xml
index 30c3f14a8299..8a8e0542eebb 100644
--- a/Build/bamboo/pom.xml
+++ b/Build/bamboo/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>com.atlassian.bamboo</groupId>
     <artifactId>bamboo-specs-parent</artifactId>
-    <version>6.1.0</version>
+    <version>6.2.2</version>
     <relativePath/>
   </parent>
 
diff --git a/Build/bamboo/src/main/java/core/PreMergeSpec.java b/Build/bamboo/src/main/java/core/PreMergeSpec.java
index ee6db6c13d52..b30ef96d8da5 100644
--- a/Build/bamboo/src/main/java/core/PreMergeSpec.java
+++ b/Build/bamboo/src/main/java/core/PreMergeSpec.java
@@ -165,7 +165,7 @@ public class PreMergeSpec extends AbstractCoreSpec {
                     .put("custom", new MapBuilder()
                         .put("auto", new MapBuilder()
                             .put("regex", "https:\\/\\/review\\.typo3\\.org\\/(#\\/c\\/)?(\\d+)")
-                            .put("label", "change-\\2, patchset-${bamboo.patchset}")
+                            .put("label", "change-\\2\\, patchset-${bamboo.patchset}")
                             .build()
                         )
                         .put("buildHangingConfig.enabled", "false")
-- 
GitLab