BRANCH_NAME = "feature/doc-develop" ORIG_BRANCH_NAME = "$BRANCH_NAME" BRANCH_NAME = "${BRANCH_NAME}".replaceAll('/', '--slash--') println "When building artifacts, use BRANCH_NAME: $BRANCH_NAME" println "When performing git operations, use ORIG_BRANCH_NAME: $ORIG_BRANCH_NAME"