Fix
Apps/everybody-mov/pipeline/head There was a failure building this commit
Details
Apps/everybody-mov/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
6d2169d0d4
commit
6a113699ad
|
@ -61,18 +61,26 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
script {
|
agent {
|
||||||
withCredentials([usernamePassword(
|
label 'main'
|
||||||
credentialsId: env.CREDENTIALS_ID,
|
}
|
||||||
usernameVariable: 'API_TOKEN_USER',
|
// when {
|
||||||
passwordVariable: 'API_TOKEN_PASS'
|
// branch 'main'
|
||||||
)]) {
|
// }
|
||||||
sh '''
|
steps {
|
||||||
curl -H 'Authorization: Bearer $API_TOKEN_PASS' -H 'Content-Type: application/json' \
|
script {
|
||||||
-X POST 'https://api.digitalocean.com/v2/apps/$APP_ID/deployments'
|
withCredentials([usernamePassword(
|
||||||
-d '{ "force_build" : true }'
|
credentialsId: env.CREDENTIALS_ID,
|
||||||
'''
|
usernameVariable: 'API_TOKEN_USER',
|
||||||
|
passwordVariable: 'API_TOKEN_PASS'
|
||||||
|
)]) {
|
||||||
|
sh '''
|
||||||
|
curl -H 'Authorization: Bearer $API_TOKEN_PASS' -H 'Content-Type: application/json' \
|
||||||
|
-X POST 'https://api.digitalocean.com/v2/apps/$APP_ID/deployments'
|
||||||
|
-d '{ "force_build" : true }'
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue