From 2715699a35a9b887d68379bfab32e7305ce52c65 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Mon, 8 Jan 2018 10:49:41 +0100 Subject: [PATCH 1/2] gulp tasks updated for e2e testing --- e2e/paths/08_add_credit.spec.js | 4 ++-- gulpfile.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/paths/08_add_credit.spec.js b/e2e/paths/08_add_credit.spec.js index 6e444db8d..d540fbe61 100644 --- a/e2e/paths/08_add_credit.spec.js +++ b/e2e/paths/08_add_credit.spec.js @@ -8,7 +8,7 @@ const moduleAccessViewHashURL = '#!/'; jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; -describe('Add credit path', () => { +fdescribe('Add credit path', () => { describe('warm up', () => { it('should warm up login and fixtures', done => { nightmare @@ -104,7 +104,7 @@ describe('Add credit path', () => { .wait(selectors.globalItems.snackbarIsActive) .getInnerText(selectors.globalItems.snackbarIsActive) .then(result => { - expect(result).toEqual('Data saved!'); + expect(result).toEqual('Data saved'); done(); }) .catch(catchErrors(done)); diff --git a/gulpfile.js b/gulpfile.js index 2455c0c4a..2bb1f85b1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -159,11 +159,11 @@ gulp.task('e2e', callback => { gulp.task('runDockerLogs', callback => { let timer = 0; + console.log('Waiting for MySQL init process...'); let waitForLocaldb = setInterval(() => { if (timer < 15000) { - timer += 2000; + timer += 1000; exec('docker logs --tail 4 dblocal', (err, stdout, stderr) => { - console.log('Waiting for MySQL init process...'); if (stdout.includes('MySQL init process done. Ready for start up.')) { console.log('MySQL init process done.'); clearInterval(waitForLocaldb); @@ -174,7 +174,7 @@ gulp.task('runDockerLogs', callback => { console.log('MySQL connection not established whithin 15 secs!'); clearInterval(waitForLocaldb); } - }, 2000); + }, 1000); }); gulp.task('endToEndTests', callback => { From 0843b824f2c9601bc8113149be631e676d1f3f48 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Mon, 8 Jan 2018 10:56:14 +0100 Subject: [PATCH 2/2] Jenkins --- Jenkinsfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 15c4ff79f..4066730c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,14 +43,18 @@ node stage ("Stopping/Removing Docker") { - env.TAG = env.BUILD_NUMBER - 1; - sh "docker-compose down --rmi 'all'" + steps{ + env.TAG = env.BUILD_NUMBER - 1; + sh "docker-compose down --rmi 'all'" + } } stage ("Generar dockers") { - env.TAG = env.BUILD_NUMBER + 1; - sh "docker-compose up -d --build" + steps{ + env.TAG = env.BUILD_NUMBER + 1; + sh "docker-compose up -d --build" + } } } } \ No newline at end of file