From 65927077aac8aa68dea6201336fc7946b5454865 Mon Sep 17 00:00:00 2001 From: cclecle Date: Sun, 19 Mar 2023 19:49:57 +0000 Subject: [PATCH 1/2] fix: git credentials for pushing --- Jenkinsfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 56a6224..8efa814 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -175,6 +175,10 @@ pipeline { } else { + $_GITEA_BASE_URL + withCredentials([usernamePassword(credentialsId: _SCMCredentials, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { + sh("git remote set-url origin https://${GIT_USERNAME}:${GIT_PASSWORD}@chacha.ddns.net/gitea/${GIT_USERNAME}/${_GITEA_PROJECT_NAME}.git") + } echo "new-tag requested in commit message: $BUMPED_VERSION" sh("git tag $BUMPED_VERSION") sh("git push origin --tags") -- 2.47.3 From 5eb2f1c5cfb1aa33b8a460d9b9b70024a0e4ff8b Mon Sep 17 00:00:00 2001 From: cclecle Date: Sun, 19 Mar 2023 19:50:23 +0000 Subject: [PATCH 2/2] fix: pipeline --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8efa814..d472446 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -175,11 +175,10 @@ pipeline { } else { - $_GITEA_BASE_URL + echo "new-tag requested in commit message: $BUMPED_VERSION" withCredentials([usernamePassword(credentialsId: _SCMCredentials, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { sh("git remote set-url origin https://${GIT_USERNAME}:${GIT_PASSWORD}@chacha.ddns.net/gitea/${GIT_USERNAME}/${_GITEA_PROJECT_NAME}.git") } - echo "new-tag requested in commit message: $BUMPED_VERSION" sh("git tag $BUMPED_VERSION") sh("git push origin --tags") } -- 2.47.3