From b75232882c538d77c97db08865b78123d1d49bb6 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Wed, 15 Mar 2023 16:06:03 -0500 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index efee593..8022d04 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,15 +30,21 @@ pipeline { branch "1.17.1" } steps { - withCredentials([usernamePassword(credentialsId: '8150559b-ec1d-41bd-a576-aa668a52c1ba', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) { - withGradle { - sh "./gradlew :Scissors-API:publish --no-daemon" - } - } - } + script { + try { + withCredentials([usernamePassword(credentialsId: 'scissors-ci', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) { + withGradle { + sh "./gradlew :Scissors-API:publish --no-daemon" + } + } + true + } catch (_) { + false + } + } + } } - } - post { + } { always { archiveArtifacts artifacts: 'build/libs/*.jar', fingerprint: true junit 'Scissors-Server/build/test-results/test/*.xml' @@ -46,4 +52,4 @@ pipeline { cleanWs() } } -} \ No newline at end of file +}