Force deploy
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
9d3b41f338
commit
5dc9a9c749
|
@ -8,22 +8,10 @@ pipeline {
|
||||||
REGISTRY = 'https://registry.digitalocean.com'
|
REGISTRY = 'https://registry.digitalocean.com'
|
||||||
IMAGE_NAME = 'registry.digitalocean.com/ailuridae-registry/ailuridae.io/everybodymov'
|
IMAGE_NAME = 'registry.digitalocean.com/ailuridae-registry/ailuridae.io/everybodymov'
|
||||||
IMAGE_BUILD = ''
|
IMAGE_BUILD = ''
|
||||||
|
APP_ID = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Setup') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image env.PYTHON_IMAGE
|
|
||||||
args '--rm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'python -m pip install --no-cache-dir --upgrade --user pip'
|
|
||||||
sh 'python -m pip install --no-cache-dir pipenv --user'
|
|
||||||
sh 'python -m pipenv install --dev'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Check') {
|
stage('Check') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
|
@ -32,7 +20,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'python -m pipenv verify'
|
sh 'python -m pip install --no-cache-dir --upgrade --user pip'
|
||||||
|
sh 'python -m pip install --no-cache-dir --user pipenv'
|
||||||
|
sh 'python -m pipenv install --dev --deploy'
|
||||||
sh 'python -m pipenv check --clear'
|
sh 'python -m pipenv check --clear'
|
||||||
sh 'python -m pipenv run bandit *.py'
|
sh 'python -m pipenv run bandit *.py'
|
||||||
}
|
}
|
||||||
|
@ -56,7 +46,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// withCredentials annoyingly required to mask token.
|
// withCredentials is annoyingly required to mask token occurrences.
|
||||||
withCredentials([usernamePassword(
|
withCredentials([usernamePassword(
|
||||||
credentialsId: env.CREDENTIALS_ID,
|
credentialsId: env.CREDENTIALS_ID,
|
||||||
usernameVariable: 'API_TOKEN_USER',
|
usernameVariable: 'API_TOKEN_USER',
|
||||||
|
@ -70,6 +60,20 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
steps('Deploy') {
|
||||||
|
script {
|
||||||
|
withCredentials([usernamePassword(
|
||||||
|
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 }'
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
|
|
Loading…
Reference in New Issue