refs TG-4: added autoReleaswe
This commit is contained in:
Vendored
+4
-4
@@ -43,7 +43,7 @@ pipeline {
|
||||
stage('Upload Artifacts to Gitea') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([string(credentialsId: 'GITEA_TOKEN', variable: 'GITEA_TOKEN')]) {
|
||||
withCredentials([string(credentialsId: 'Gitea_Credentials', variable: 'Gitea_Credentials')]) {
|
||||
def releaseUrl = "https://git.grigowashere.ru/api/v1/repos/username/repo/releases"
|
||||
def json = """{
|
||||
"tag_name": "v${BUILD_NUMBER}",
|
||||
@@ -54,7 +54,7 @@ pipeline {
|
||||
"prerelease": false
|
||||
}"""
|
||||
sh """
|
||||
curl -X POST ${releaseUrl} -H 'Authorization: token ${GITEA_TOKEN}' -d '${json}'
|
||||
curl -X POST ${releaseUrl} -H 'Authorization: token ${Gitea_Credentials}' -d '${json}'
|
||||
if [ \$? -ne 0 ]; then
|
||||
echo 'Error creating release'
|
||||
exit 1
|
||||
@@ -68,10 +68,10 @@ pipeline {
|
||||
stage('Upload Artifacts to Gitea Release') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([string(credentialsId: 'GITEA_TOKEN', variable: 'GITEA_TOKEN')]) {
|
||||
withCredentials([string(credentialsId: 'Gitea_Credentials', variable: 'Gitea_Credentials')]) {
|
||||
def releaseUploadUrl = "https://git.grigowashere.ru/api/v1/repos/username/repo/releases/tags/v${BUILD_NUMBER}/assets"
|
||||
sh """
|
||||
curl -X POST ${releaseUploadUrl} -H 'Authorization: token ${GITEA_TOKEN}' -F 'file=@dist/windows/test_app.exe'
|
||||
curl -X POST ${releaseUploadUrl} -H 'Authorization: token ${Gitea_Credentials}' -F 'file=@dist/windows/test_app.exe'
|
||||
if [ \$? -ne 0 ]; then
|
||||
echo 'Error uploading artifact'
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user