Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
1cc91532af | |||
645425ee38 | |||
45ea43f32f |
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -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.1'
|
def tagName = 'v1.0.3'
|
||||||
def releaseTitle = 'v1.0.1'
|
def releaseTitle = 'v1.0.3'
|
||||||
def releaseDescription = 'v1.0.1'
|
def releaseDescription = 'v1.0.3'
|
||||||
def zipFile = 'hello-world.zip'
|
def zipFile = 'hello-world.zip'
|
||||||
|
|
||||||
def createReleaseResponse = sh(script: """
|
def createReleaseResponse = sh(script: """
|
||||||
@ -44,8 +44,8 @@ pipeline {
|
|||||||
def releaseID = parsedResponse.id
|
def releaseID = parsedResponse.id
|
||||||
|
|
||||||
sh """
|
sh """
|
||||||
curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: application/octet-stream" \\
|
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}"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user