cloud deploy: remove ZWSP from STACK_NAME
In case stack_name is copied from jenkins web
ui ZWSP characters are usually inserted which
results in typical encoding troubles unless
they are removed
Change-Id: Id2bc6dddbc0caa362a17c4f9f3ac7ad42827d2e1
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index bf7e238..254f39d 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -143,6 +143,10 @@
}
currentBuild.description = STACK_NAME
}
+ } else {
+ // In case name was copied with unicode zero-width space chars -
+ // remove them
+ STACK_NAME = STACK_NAME.trim().replaceAll("\\p{C}", "")
}
// no underscore in STACK_NAME