Merge "Revert "Refactor generate-cookiecutter-products""
diff --git a/branch-git-repos.groovy b/branch-git-repos.groovy
index 0624c40..b5a65b5 100644
--- a/branch-git-repos.groovy
+++ b/branch-git-repos.groovy
@@ -110,14 +110,14 @@
sh 'git config user.email "ci+infra@mirantis.com"'
// Update list of branches
- sh 'git remote update origin --prune'
+ sh 'git fetch --prune --tags'
// Ensure there is no branch or tag with gitBranchNew name
sh "git branch -d '${gitBranchNew}' && git push origin ':${gitBranchNew}' || :"
sh "git tag -d '${gitBranchNew}' && git push origin ':refs/tags/${gitBranchNew}' || :"
// Create new branch
- sh "git checkout -b '${gitBranchNew}' '${gitSrcObj}'" // Create new local branch
+ sh "git branch '${gitBranchNew}' '${gitSrcObj}'" // Create new local branch
sh "git push origin '${gitBranchNew}'" // ... push new branch
}
}
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index a51f436..1f7dd1f 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