From ade75810809310440ce274322084f60e180a302f Mon Sep 17 00:00:00 2001 From: yuobrezkov Date: Wed, 9 Apr 2025 14:58:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac2600a..2f0d598 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -89,27 +89,27 @@ pipeline { sh "rm -rf ${env.WORKSPACE}/rc/ || true" } } - success { - script { - if (env.CHANGE_BRANCH?.startsWith('rc')) { - echo "Attempting to merge PR ${env.CHANGE_ID} into master..." - withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) { - def prId = env.CHANGE_ID - sh """ - curl -X POST \ - -u "${GITEA_USER}:${GITEA_PASS}" \ - -H "Content-Type: application/json" \ - -d '{"do":"merge"}' \ - http://git.entcor/api/v1/repos/deployer3000/trust-module-backend/pulls/${prId}/merge - """ - echo "PR ${prId} merged successfully into main!" - 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, "trust-module-backend", commitHash, "success") - } - } - } - } + // success { + // script { + // if (env.CHANGE_BRANCH?.startsWith('rc')) { + // echo "Attempting to merge PR ${env.CHANGE_ID} into master..." + // withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) { + // def prId = env.CHANGE_ID + // sh """ + // curl -X POST \ + // -u "${GITEA_USER}:${GITEA_PASS}" \ + // -H "Content-Type: application/json" \ + // -d '{"do":"merge"}' \ + // http://git.entcor/api/v1/repos/deployer3000/trust-module-backend/pulls/${prId}/merge + // """ + // echo "PR ${prId} merged successfully into main!" + // 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, "trust-module-backend", commitHash, "success") + // } + // } + // } + // } failure { echo "Pipeline failed. Check the logs for details." }