diff --git a/Jenkinsfile b/Jenkinsfile index 88f6e1e..1d3d43e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,17 +30,19 @@ pipeline { branch "1.19.3" } steps { - try { - withCredentials([usernamePassword(credentialsId: 'scissors-ci', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) { - withGradle { - sh "./gradlew :Scissors-API:publish --no-daemon" - } - } - true - } catch (_) { - false + script { + try { + withCredentials([usernamePassword(credentialsId: 'scissors-ci', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) { + withGradle { + sh "./gradlew :Scissors-API:publish --no-daemon" + } + } + true + } catch (_) { + false + } } - } + } } } post {