diff --git a/Jenkinsfile b/Jenkinsfile index c0dbc49..6a18e63 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,9 @@ pipeline { when { branch "release" } + environment { + GITEA_PAT = credentials('0bd7c8f5-046c-44b9-9c77-7a28a219ae31') + } steps{ sh """ filename=\$(ls ./*.nupkg | head -1) @@ -34,7 +37,7 @@ pipeline { noext=\${fullfilename%.*} curl -X 'POST' \ -o release.json - 'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases?token=$0bd7c8f5-046c-44b9-9c77-7a28a219ae31' \ + 'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases?token=$GITEA_PAT' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ @@ -48,7 +51,7 @@ pipeline { releaseid=\$(cat release.json | jq .id) curl -X 'POST' \ - 'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases/\$releaseid/assets?name=\$noext&token=$0bd7c8f5-046c-44b9-9c77-7a28a219ae31' \ + 'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases/\$releaseid/assets?name=\$noext&token=$GITEA_PAT' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'attachment=@\$fullfilename'