Compare commits
No commits in common. "a7411c2461e5bf7f44590efc091927c3de70cb3b" and "9f26570dad6c10c01ae4e8314829342ec0fe2368" have entirely different histories.
a7411c2461
...
9f26570dad
|
|
@ -88,6 +88,14 @@ pipeline {
|
||||||
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim()
|
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
|
||||||
|
echo "GIT_COMMIT: ${env.GIT_COMMIT}"
|
||||||
|
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": "${commitHash}}"}' \
|
||||||
|
"${env.GITEA_REPOSITORY_URL}deployer3000/${env.IMAGE_NAME}/releases"
|
||||||
|
"""
|
||||||
|
echo "New release succeeded!"
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
|
|
@ -97,16 +105,6 @@ pipeline {
|
||||||
http://git.entcor/api/v1/repos/deployer3000/${env.IMAGE_NAME}/pulls/${prId}/merge
|
http://git.entcor/api/v1/repos/deployer3000/${env.IMAGE_NAME}/pulls/${prId}/merge
|
||||||
"""
|
"""
|
||||||
echo "PR ${prId} merged successfully into main!"
|
echo "PR ${prId} merged successfully into main!"
|
||||||
|
|
||||||
echo "GIT_COMMIT: ${env.GIT_COMMIT}"
|
|
||||||
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}"}' \
|
|
||||||
"${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/${env.IMAGE_NAME}/pipeline/pr-${env.CHANGE_TARGET}"
|
||||||
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