Compare commits
No commits in common. "1cf3c77b94fe6c79ca137eb60b9e3d35dc59c742" and "7b5b4437213b4f026fb4345637b7082d4efb40e2" have entirely different histories.
1cf3c77b94
...
7b5b443721
|
|
@ -82,13 +82,12 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
if (env.CHANGE_BRANCH?.startsWith('rc')) {
|
if (env.CHANGE_BRANCH?.startsWith('rc')) {
|
||||||
echo "Attempting to merge PR ${env.CHANGE_ID} into master..."
|
echo "Attempting to merge PR ${env.CHANGE_ID} into master..."
|
||||||
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim()
|
|
||||||
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
|
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
|
||||||
def prId = env.CHANGE_ID
|
def prId = env.CHANGE_ID
|
||||||
sh """
|
sh """
|
||||||
curl -v -X POST -u "${GITEA_USER}:${GITEA_PASS}" \
|
curl -v -X POST -u "${GITEA_USER}:${GITEA_PASS}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"tag_name": "${env.NEW_VERSION}", "name": "Release ${env.NEW_VERSION}", "target_commitish": "${commitHash}"}' \
|
-d '{"tag_name": "${env.NEW_VERSION}", "name": "Release ${env.NEW_VERSION}", "target_commitish": "${env.GIT_COMMIT}"}' \
|
||||||
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
|
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
|
||||||
"""
|
"""
|
||||||
echo "New release succeeded!"
|
echo "New release succeeded!"
|
||||||
|
|
@ -102,6 +101,7 @@ pipeline {
|
||||||
"""
|
"""
|
||||||
echo "PR ${prId} merged successfully into main!"
|
echo "PR ${prId} merged successfully into main!"
|
||||||
def context = "test-org/${env.IMAGE_NAME}/pipeline/pr-${env.CHANGE_TARGET}"
|
def context = "test-org/${env.IMAGE_NAME}/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, env.IMAGE_NAME, commitHash, "success")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue