diff --git a/Jenkinsfile b/Jenkinsfile index 4e12946..7be09c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,6 +86,7 @@ pipeline { if (env.CHANGE_BRANCH?.startsWith('rc')) { echo "Attempting to merge PR ${env.CHANGE_ID} into master..." def commitHash = sh(script: "git rev-parse HEAD~1", returnStdout: true).trim() + def mergeCommitHash = sh(script: "git rev-parse HEAD", returnStdout: true).trim() withCredentials([usernamePassword(credentialsId: 'gitea_creds', usernameVariable: 'GITEA_USER', passwordVariable: 'GITEA_PASS')]) { def prId = env.CHANGE_ID @@ -98,7 +99,6 @@ pipeline { """ echo "PR ${prId} merged successfully into main!" - def mergeCommitHash = sh(script: "git rev-parse HEAD", returnStdout: true).trim() echo "Merge commit hash: ${mergeCommitHash}" sh """ curl -v -X POST -u "${GITEA_USER}:${GITEA_PASS}" \ diff --git a/README.md b/README.md index d0027cf..a01981c 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,5 @@ ```bash docker build -t test-ci-cd . -docker run --rm --name test-ci-cd -p 8000:8080 test-ci-cd:latest \ No newline at end of file +docker run --rm --name test-ci-cd -p 8000:8080 test-ci-cd:latest +kakak \ No newline at end of file