Compare commits
No commits in common. "1e1b48685d4248c55bb31ba9a3a61bc8cfe6e907" and "91ba37cff2a4ec6ec91a36c9564c0cce57ed4861" have entirely different histories.
1e1b48685d
...
91ba37cff2
|
|
@ -30,23 +30,21 @@ pipeline {
|
|||
stage ('Initialize variables') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
|
||||
lastVersion = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
|
||||
|
||||
if (!lastVersion) {
|
||||
lastVersion = "0.0.0"
|
||||
}
|
||||
|
||||
echo "Last version: ${lastVersion}"
|
||||
|
||||
sh "echo ${lastVersion}"
|
||||
def (major, minor, patch) = lastVersion.tokenize('.')
|
||||
def newVersion = "${major}.${minor}.${patch.toInteger() + 1}"
|
||||
echo "New version: ${newVersion}"
|
||||
|
||||
env.IMAGE_TAG = newVersion
|
||||
env.NEW_VERSION = newVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Build docker image') {
|
||||
when {
|
||||
expression { env.CHANGE_BRANCH?.startsWith('rc') }
|
||||
|
|
@ -99,7 +97,7 @@ pipeline {
|
|||
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
|
||||
"""
|
||||
echo "New release succeeded!"
|
||||
def context = "test-org/${env.IMAGE_NAME}/pipeline/pr-${env.CHANGE_TARGET}"
|
||||
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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue