Проверка1
test-org/test-ci-cd/pipeline/pr-main There was a failure building this commit Details

pull/9/head
yuobrezkov 2025-04-09 16:38:52 +03:00
parent 7276118e98
commit f1a8594a2f
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -85,10 +85,11 @@ pipeline {
def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim()
withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) {
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}"}' \
-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"
"""
echo "New release succeeded!"