Compare commits

..

No commits in common. "91ba37cff2a4ec6ec91a36c9564c0cce57ed4861" and "303d8f87d4cfc06220d38e3d3b773c5c87775574" have entirely different histories.

1 changed files with 6 additions and 2 deletions

8
Jenkinsfile vendored
View File

@ -31,7 +31,11 @@ pipeline {
steps {
script {
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
def lastVersion = sh(script: """
curl -s -u "${GITEA_USER}:${GITEA_PASS}" \
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases" | \
sed -n 's/.*"tag_name": *"\\([^"]*\\).*/\\1/p' | sort -V | tail -n1
""", returnStdout: true).trim()
if (!lastVersion) {
lastVersion = "0.0.0"
@ -99,7 +103,7 @@ pipeline {
echo "New release succeeded!"
def context = "test-org/trust-module-backend/pipeline/pr-${env.CHANGE_TARGET}"
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim()
notify(context, GITEA_USER, GITEA_PASS, env.GITEA_REPOSITORY_URL, env.IMAGE_NAME, commitHash, "success")
notify(context, GITEA_USER, GITEA_PASS, env.GITEA_REPOSITORY_URL, "trust-module-backend", commitHash, "success")
}
}
}