Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
7884549534 | |||
92c7da272d | |||
87dc3eefeb | |||
fb3dc36e46 | |||
50abde1e82 | |||
a2c258989f |
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -28,7 +28,7 @@ pipeline {
|
||||
branch "release"
|
||||
}
|
||||
environment {
|
||||
GITEA_PAT = credentials('0bd7c8f5-046c-44b9-9c77-7a28a219ae31')
|
||||
GITEA = credentials('0bd7c8f5-046c-44b9-9c77-7a28a219ae31')
|
||||
}
|
||||
steps{
|
||||
sh """
|
||||
@ -37,25 +37,28 @@ pipeline {
|
||||
noext=\${fullfilename%.*}
|
||||
curl -X 'POST' \
|
||||
-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 'Authorization: token $GITEA_PSW' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"body": "\$(date)",
|
||||
"body": "automatic build at \$(date)",
|
||||
"draft": false,
|
||||
"name": "$BUILD_NUMBER",
|
||||
"prerelease": false,
|
||||
"tag_name": "$BUILD_NUMBER",
|
||||
"target_commitish": "$GIT_COMMIT"
|
||||
}'
|
||||
cat release.json
|
||||
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' \
|
||||
\$postURL \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: token $GITEA_PSW' \
|
||||
-H 'Content-Type: multipart/form-data' \
|
||||
-F 'attachment=@\$fullfilename'
|
||||
-F "attachment=@\$fullfilename"
|
||||
|
||||
releaseid=null
|
||||
filename=null
|
||||
|
Loading…
Reference in New Issue
Block a user