From 34f12e3e083ef75abe91417798c860f6d070e631 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 8 Jan 2026 20:13:32 +0100 Subject: [PATCH] New try --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a53a2f0..69633bb 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,12 +50,12 @@ pipeline { def buildDesc = currentBuild.currentResult == 'SUCCESS' ? 'Build successful' : 'Build failed' // Notify Gitea using the API (requires credential in Jenkins) - withCredentials([string(credentialsId: 'jenkins', variable: 'GITEA_TOKEN')]) { + withCredentials([[$class: 'StringBinding', credentialsId: 'jenkins', variable: 'GITEA_TOKEN']]) { sh """ curl -f -X POST "${GITEA_API_URL}/repos/${GITEA_REPO_PATH}/statuses/${commitSha}" \ - -H "Authorization: token ${GITEA_TOKEN}" \ - -H "Content-Type: application/json" \ - -d '{"state": "${buildState}", "target_url": "${env.BUILD_URL}", "description": "${buildDesc}", "context": "jenkins-ci"}' + -H "Authorization: token ${GITEA_TOKEN}" \ + -H "Content-Type: application/json" \ + -d '{"state": "${buildState}", "target_url": "${env.BUILD_URL}", "description": "${buildDesc}", "context": "jenkins-ci"}' """ } }