#814 Deploy fixes

This commit is contained in:
Juan Ferrer 2019-01-01 23:43:00 +01:00
parent 756b5a82ff
commit de53a9d3a0
2 changed files with 19 additions and 12 deletions

25
Jenkinsfile vendored
View File

@ -1,8 +1,5 @@
#!/usr/bin/env groovy
env.COMPOSE_HTTP_TIMEOUT = 300;
env.COMPOSE_PROJECT_NAME = salix
switch (env.BRANCH_NAME) {
case 'test':
env.NODE_ENV = 'test';
@ -14,7 +11,9 @@ switch (env.BRANCH_NAME) {
node {
stage ('Print environment variables') {
echo "Branch ${env.BRANCH_NAME}, build number ${env.BUILD_NUMBER}, environment ${env.NODE_ENV}"
echo "Branch: ${env.BRANCH_NAME}"
echo "Build number: ${env.BUILD_NUMBER}"
echo "Node environment: ${env.NODE_ENV}"
}
stage ('Checkout') {
checkout scm
@ -31,13 +30,21 @@ node {
sh "gulp build"
}
}
stage ('Generating new dockers') {
stage ('Docker deployment') {
environment {
COMPOSE_HTTP_TIMEOUT = 300
COMPOSE_PROJECT_NAME = 'salix'
DOCKER_TLS_VERIFY = 1
}
sh "docker-compose build"
env.DOCKER_HOST = 'tcp://vch1.verdnatura.es:2376';
sh "docker-compose up -d"
withCredentials([dockerCert(credentialsId: 'docker', variable: 'DOCKER_CERT_PATH')]) {
env.DOCKER_HOST = 'tcp://vch1.verdnatura.es:2376';
sh "docker-compose up -d"
env.DOCKER_HOST = 'tcp://vch2.verdnatura.es:2376';
sh "docker-compose up -d"
env.DOCKER_HOST = 'tcp://vch2.verdnatura.es:2376';
sh "docker-compose up -d"
}
}
}

View File

@ -78,7 +78,7 @@ gulp.task('e2e-only', () => {
if (argv.show || argv.s)
process.env.E2E_SHOW = true;
return gulp.src('./e2e_tests.js')
return gulp.src('./e2e/tests.js')
.pipe(jasmine({reporter: 'none'}));
});
@ -88,7 +88,7 @@ gulp.task('smokes', ['docker'], async() => {
gulp.task('smokes-only', () => {
const jasmine = require('gulp-jasmine');
return gulp.src('./smokes_tests.js')
return gulp.src('./smokes-tests.js')
.pipe(jasmine({reporter: 'none'}));
});
@ -125,7 +125,7 @@ gulp.task('install', () => {
const install = require('gulp-install');
const print = require('gulp-print');
let packageFiles = [];
let packageFiles = ['front/package.json'];
let services = fs.readdirSync(servicesDir);
services.forEach(service => {
packageFiles.push(`${servicesDir}/${service}/package.json`);