diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index c39e287..7fc1e3c 100755 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -1,6 +1,7 @@ #!groovy def cleanSlateEnabled +def sanitizedBranchName // Package change state def appPackageChanged @@ -84,6 +85,7 @@ pipeline { steps { script { cleanSlateEnabled = sh (script: "git log -1 | grep -qE 'ci: force'", returnStatus: true) + sanitizedBranchName = "${BRANCH_NAME#*/}" appPackageChanged = sh(script: 'bash ./jenkins/check_package_changed.sh app "$GIT_COMMIT" "$GIT_PREVIOUS_COMMIT"', returnStdout: true).trim() contractsPackageChanged = sh(script: 'bash ./jenkins/check_package_changed.sh contracts "$GIT_COMMIT" "$GIT_PREVIOUS_COMMIT"', returnStdout: true).trim() @@ -128,7 +130,7 @@ pipeline { --net=concordia_ganache_test_network""") { concordiaGanacheTest -> contractsTestsImage = docker.build( - "ecentrics/concordia-contracts-tests:${BRANCH_NAME}-v${contractsPackageVersion}-b${BUILD_NUMBER}-tests", + "ecentrics/concordia-contracts-tests:${sanitizedBranchName}-v${contractsPackageVersion}-b${BUILD_NUMBER}-tests", "-f docker/concordia-contracts/Dockerfile \ ./ \ --target test \ @@ -158,7 +160,7 @@ pipeline { steps { script { appTestsImage = docker.build( - "ecentrics/concordia-app:${BRANCH_NAME}-v${appPackageVersion}-b${BUILD_NUMBER}-tests", + "ecentrics/concordia-app:${sanitizedBranchName}-v${appPackageVersion}-b${BUILD_NUMBER}-tests", "-f docker/concordia-app/Dockerfile \ ./ \ --target test \