Compare commits

..

No commits in common. "bdf085cebb584393030ada942cccbe9ffaa99e37" and "a89a5f3d28cd94a864d347a0478569a3bdd37ef4" have entirely different histories.

1 changed files with 4 additions and 2 deletions

6
Jenkinsfile vendored
View File

@ -98,11 +98,13 @@ pipeline {
"""
echo "PR ${prId} merged successfully into main!"
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim()
def prCommitHash = sh(script: "git rev-parse HEAD", returnStdout: true).trim()
def newCommitHash = sh(script: "git rev-parse HEAD", returnStdout: true).trim()
echo "COMMIT_HASH ${commitHash}"
echo "NEW_COMMIT_HASH ${newCommitHash} "
sh """
curl -v -X POST -u "${GITEA_USER}:${GITEA_PASS}" \
-H "Content-Type: application/json" \
-d '{"tag_name": "${env.NEW_VERSION}", "name": "Release ${env.NEW_VERSION}", "target_commitish": "${prCommitHash}"}' \
-d '{"tag_name": "${env.NEW_VERSION}", "name": "Release ${env.NEW_VERSION}", "target_commitish": "${newCommitHash}"}' \
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
"""
echo "New release succeeded!"