diff --git a/Jenkinsfile b/Jenkinsfile index 73525ca..730a3cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { stage ('Initialize variables') { steps { script { - def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim() + def lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim() || null if (!lastVersion) { lastVersion = "0.0.0" @@ -82,7 +82,7 @@ pipeline { script { if (env.CHANGE_BRANCH?.startsWith('rc')) { echo "Attempting to merge PR ${env.CHANGE_ID} into master..." - def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim() || null + def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim() withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) { def prId = env.CHANGE_ID echo "GIT_COMMIT: ${env.GIT_COMMIT}"