From 11b40ae0463e350a8584942cedaa61d0ae6c3ace Mon Sep 17 00:00:00 2001 From: Juan Date: Fri, 27 Apr 2018 13:31:12 +0200 Subject: [PATCH] Jenkinsfile now uses latest docker tag --- Jenkinsfile | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 76a65da7d3..4d414a7807 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,12 +2,11 @@ def branchName = "${env.BRANCH_NAME}"; +// TODO: We are using latest tag until image rotation it's implemented +env.TAG = "latest" /* "${env.BUILD_NUMBER}" */; env.BRANCH_NAME = branchName; -env.TAG = "${env.BUILD_NUMBER}"; env.salixUser="${env.salixUser}"; env.salixPassword="${env.salixPassword}"; -env.salixHost = "${env.productionSalixHost}"; -env.salixPort = "${env.productionSalixPort}"; switch (branchName) { case "test": @@ -17,7 +16,9 @@ switch (branchName) { break; case "master": env.NODE_ENV = "production" - env.DOCKER_HOST = "tcp://172.16.255.29:2375"; + env.salixHost = "${env.productionSalixHost}"; + env.salixPort = "${env.productionSalixPort}"; + env.DOCKER_HOST = "tcp://vch1.verdnatura.es:2375"; break; } @@ -28,26 +29,19 @@ node { stage ('Checkout') { checkout scm } - - stage ('install modules') { + stage ('Install client Node dependencies') { sh "npm install" } - - stage ('build Project') { + stage ("Removing old dockers") { + sh "docker-compose down --rmi 'all'" + } + stage ('Build project') { sh "gulp build" } - - stage ("docker") { - stage ("install modules loopback service") { - sh "cd ./services/loopback && npm install" - } - - stage ("Stopping/Removing Docker") { - sh "docker-compose down --rmi 'all'" - } - - stage ("Generar dockers") { - sh "docker-compose up -d --build" - } + stage ("Install services Node dependencies") { + sh "cd ./services/loopback && npm install" + } + stage ("Generating new dockers") { + sh "docker-compose up -d --build" } }