#814 Docker deploy fixes

This commit is contained in:
Juan Ferrer 2019-01-02 00:40:53 +01:00
parent 4305c35946
commit 1c08ad6e2e
1 changed files with 7 additions and 11 deletions

18
Jenkinsfile vendored
View File

@ -11,9 +11,7 @@ switch (env.BRANCH_NAME) {
node {
stage ('Print environment variables') {
echo "Branch: ${env.BRANCH_NAME}"
echo "Build number: ${env.BUILD_NUMBER}"
echo "Node environment: ${env.NODE_ENV}"
echo "Build number: ${env.BUILD_NUMBER}, Node environment: ${env.NODE_ENV}"
}
stage ('Checkout') {
checkout scm
@ -31,15 +29,13 @@ node {
}
}
stage ('Docker deployment') {
env.COMPOSE_HTTP_TIMEOUT = 300
env.COMPOSE_PROJECT_NAME = 'salix'
env.DOCKER_TLS_VERIFY = 1
sh "docker-compose build"
withCredentials([dockerCert(credentialsId: 'docker', variable: 'DOCKER_CERT_PATH')]) {
environment {
COMPOSE_HTTP_TIMEOUT = 300
COMPOSE_PROJECT_NAME = 'salix'
DOCKER_TLS_VERIFY = 1
}
sh "docker-compose build"
env.DOCKER_HOST = 'tcp://vch2.verdnatura.es:2376';
sh "docker-compose up -d"
}