Compare commits

...

1 Commits
v1.0.2 ... main

Author SHA1 Message Date
1cc91532af Change upload method to attachment 2024-03-31 13:09:14 +03:30

8
Jenkinsfile vendored
View File

@ -29,9 +29,9 @@ pipeline {
script { script {
def repoOwner = 'reza' def repoOwner = 'reza'
def repoName = 'go-hello-world' def repoName = 'go-hello-world'
def tagName = 'v1.0.2' def tagName = 'v1.0.3'
def releaseTitle = 'v1.0.2' def releaseTitle = 'v1.0.3'
def releaseDescription = 'v1.0.2' def releaseDescription = 'v1.0.3'
def zipFile = 'hello-world.zip' def zipFile = 'hello-world.zip'
def createReleaseResponse = sh(script: """ def createReleaseResponse = sh(script: """
@ -45,7 +45,7 @@ pipeline {
sh """ sh """
curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: multipart/form-data" \\ curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: multipart/form-data" \\
--data-binary @${zipFile} \\ -F 'attachment=@${zipFile};type=application/zip' \\
"https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}" "https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}"
""" """