giteapat as header. shrug.
All checks were successful
gitea.arg.rip/jenkins-playground/pipeline/head This commit looks good
All checks were successful
gitea.arg.rip/jenkins-playground/pipeline/head This commit looks good
This commit is contained in:
parent
87dc3eefeb
commit
92c7da272d
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -37,8 +37,9 @@ pipeline {
|
|||||||
noext=\${fullfilename%.*}
|
noext=\${fullfilename%.*}
|
||||||
curl -X 'POST' \
|
curl -X 'POST' \
|
||||||
-o release.json \
|
-o release.json \
|
||||||
'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases?token=$GITEA_PAT' \
|
'https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases' \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
|
-H 'Authorization: token $GITEA_PAT' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
-d '{
|
||||||
"body": "automatic build at \$(date)",
|
"body": "automatic build at \$(date)",
|
||||||
@ -51,10 +52,11 @@ pipeline {
|
|||||||
cat release.json
|
cat release.json
|
||||||
releaseid=\$(cat release.json | jq .id)
|
releaseid=\$(cat release.json | jq .id)
|
||||||
|
|
||||||
postURL="https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases/\$releaseid/assets?name=\$noext&token=$GITEA_PAT"
|
postURL="https://gitea.arg.rip/api/v1/repos/greyn/jenkins-playground/releases/\$releaseid/assets?name=\$noext"
|
||||||
curl -X 'POST' \
|
curl -X 'POST' \
|
||||||
\$postURL \
|
\$postURL \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
|
-H 'Authorization: token $GITEA_PAT' \
|
||||||
-H 'Content-Type: multipart/form-data' \
|
-H 'Content-Type: multipart/form-data' \
|
||||||
-F "attachment=@\$fullfilename"
|
-F "attachment=@\$fullfilename"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user