Fix child-deploy regex
PRODX-14029
Change-Id: Ifec64fedd50bc5926cc3d89a13ddfeaa67838ce6
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index 0e9c335..4970931 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -96,11 +96,11 @@
deployChild = true
upgradeChild = true
}
- def deployMatches = (commitMsg =~ /(?s).*\[child-deploy (\w|\W)+\].*/)
+ def deployMatches = (commitMsg =~ /(\[child-deploy\s*(\w|\W)+?\])/)
if (deployMatches.size() > 0) {
// override child version when it set explicitly
deployChild = true
- customChildRelease = deployMatches[0][0].split('child-deploy')[1].replaceAll(']', '').trim()
+ customChildRelease = deployMatches[0][0].split('child-deploy')[1].replaceAll('[\\[\\]]', '').trim()
common.warningMsg("Forced child deployment using custom release version ${customChildRelease}")
}
if (commitMsg ==~ /(?s).*\[byo-attach\].*/ || env.GERRIT_EVENT_COMMENT_TEXT ==~ /(?s).*byo-attach.*/) {