From 1023ba4deb685c1bf4dc464510864d4d3ecd537e Mon Sep 17 00:00:00 2001 From: dtwaddle2-r7 Date: Fri, 17 Nov 2023 15:32:06 +0000 Subject: [PATCH] Set git config --- Jenkinsfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 46f0a496..856b1494 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,10 @@ pipeline { stages { stage('tag') { steps { - sh """git tag -a "v${VERSION}" -m "Version ${VERSION}" && git push --tags""" + withCredentials([usernamePassword(credentialsId: 'github-app-key', usernameVariable: 'GH_APP', passwordVariable: 'GH_TOKEN')]) { + setGitConfig() + sh """git tag -a "v${VERSION}" -m "Version ${VERSION}" && git push --tags""" + } } } @@ -69,7 +72,7 @@ pipeline { curl --silent --show-error \ -H "Content-Type: application/json" \ -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token \${GH_TOKEN}" \ + -H "Authorization: token ${GH_TOKEN}" \ -d '{"tag_name":"'"v${VERSION}"'", "generate_release_notes": true, "name": "'"v${VERSION} - \$(date +"%Y.%m.%d")"'"}' \ https://api.github.com/repos/rapid7/recog/releases > recog-content-releases-response.json """