From 3dd0bd9a49e971941bc24b11cb4ab1bcb346d862 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 15:55:41 -0300 Subject: [PATCH 01/26] adding a readme --- worker/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 worker/README.md diff --git a/worker/README.md b/worker/README.md new file mode 100644 index 0000000000..bde5cde363 --- /dev/null +++ b/worker/README.md @@ -0,0 +1 @@ +## worker java app From 8dde1aaf65a576a0572e68162da6135e1a6f7ffb Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 15:57:25 -0300 Subject: [PATCH 02/26] hi --- worker/README2.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 worker/README2.md diff --git a/worker/README2.md b/worker/README2.md new file mode 100644 index 0000000000..fcbf1bd05a --- /dev/null +++ b/worker/README2.md @@ -0,0 +1 @@ +## adding a second file From 2695e991b23482129252e6a35a36f2ee309f5912 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 16:16:57 -0300 Subject: [PATCH 03/26] adding build status badge --- worker/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worker/README.md b/worker/README.md index bde5cde363..9a0f883731 100644 --- a/worker/README.md +++ b/worker/README.md @@ -1 +1,6 @@ ## worker java app + + + * Build Status + [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)] + (http://157.230.222.153:8080/job/instavote/job/worker-build/) From 90d6536ca719d8dd4294abefa5e3806c4d17b417 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 16:20:27 -0300 Subject: [PATCH 04/26] update --- worker/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worker/README.md b/worker/README.md index 9a0f883731..efee5ddf38 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,5 +2,4 @@ * Build Status - [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)] - (http://157.230.222.153:8080/job/instavote/job/worker-build/) +[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://157.230.222.153:8080/job/instavote/job/worker-build/) From 75c08f6c1fc9d8e02422911056675a6e75431e1c Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 16:38:16 -0300 Subject: [PATCH 05/26] added badge for unit test jenkins job --- worker/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worker/README.md b/worker/README.md index efee5ddf38..45280365f2 100644 --- a/worker/README.md +++ b/worker/README.md @@ -1,5 +1,8 @@ ## worker java app - * Build Status + [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://157.230.222.153:8080/job/instavote/job/worker-build/) + + +[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) From fa66c83b7fc079687220b9c75dc839a8970c1d4b Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Tue, 4 Oct 2022 17:08:48 -0300 Subject: [PATCH 06/26] create READMe.md --- result/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 result/README.md diff --git a/result/README.md b/result/README.md new file mode 100644 index 0000000000..415f1ce8ea --- /dev/null +++ b/result/README.md @@ -0,0 +1,6 @@ +## this is a readme file with the Jenkins badges + +for Build +[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=result-build)](http://157.230.222.153:8080/job/result-build/) +and for Test +[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=result-test)](http://157.230.222.153:8080/job/result-test/) From b595f365af67b8edba27043071aea1ed1819a53e Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 15:42:12 +0000 Subject: [PATCH 07/26] test --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b8ad8a94af..b2753b6a80 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ Example Voting App ========= + Getting started --------------- From 8bf159cf9b61ce9f67ecec3dfd0dfe8126a7d8ac Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 15:55:42 +0000 Subject: [PATCH 08/26] test --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b2753b6a80..d8cc6e49b8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ Example Voting App ========= + Getting started --------------- From 155209d34ecd2fcbe990c3d6e36eea782fa066cf Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 15:58:37 -0300 Subject: [PATCH 09/26] Delete README2.md --- worker/README2.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 worker/README2.md diff --git a/worker/README2.md b/worker/README2.md deleted file mode 100644 index fcbf1bd05a..0000000000 --- a/worker/README2.md +++ /dev/null @@ -1 +0,0 @@ -## adding a second file From e9f7b16632a54403ad1d2e907dba9a57ca06ffe8 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:02:20 -0300 Subject: [PATCH 10/26] change --- worker/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worker/README.md b/worker/README.md index 45280365f2..e23715d46d 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,7 +2,6 @@ -[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://157.230.222.153:8080/job/instavote/job/worker-build/) - +http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) From ac03f3db43566f12ea43404c4ffff2306f51e0f0 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:03:08 -0300 Subject: [PATCH 11/26] change --- worker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/README.md b/worker/README.md index e23715d46d..5511b03ef3 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,6 +2,6 @@ -http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build +[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://157.230.222.153:8080/job/instavote/job/worker-build/) [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) From 698e3e23971ecce43720cc76f0aa2b953130f9e3 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:04:01 -0300 Subject: [PATCH 12/26] change --- worker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/README.md b/worker/README.md index 5511b03ef3..000f54ff1a 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,6 +2,6 @@ -[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://157.230.222.153:8080/job/instavote/job/worker-build/) +[[image:http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build>>http://157.230.222.153:8080/job/instavote/job/worker-build/||target='__new']] [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) From 14bdb7ee3d363d65875a0aff0c794269a92c325c Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:05:30 -0300 Subject: [PATCH 13/26] change again --- worker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/README.md b/worker/README.md index 000f54ff1a..6837eaaabe 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,6 +2,6 @@ -[[image:http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build>>http://157.230.222.153:8080/job/instavote/job/worker-build/||target='__new']] +http://157.230.222.153:8080/buildStatus/text?job=instavote%2Fworker-build [![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) From 93f4877eda3359ce4b8b06c3c3ea189b7460280d Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:24:34 -0300 Subject: [PATCH 14/26] change again --- worker/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worker/README.md b/worker/README.md index 6837eaaabe..0507760d3d 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,6 +2,7 @@ -http://157.230.222.153:8080/buildStatus/text?job=instavote%2Fworker-build +http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build -[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test&subject=UnitTest)](http://157.230.222.153:8080/job/instavote/job/wroker-test/) + +http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test From c5a142a34dd24b554d7d430f74ddf30af0956832 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:27:08 -0300 Subject: [PATCH 15/26] change --- worker/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worker/README.md b/worker/README.md index 0507760d3d..52e8fcfcdc 100644 --- a/worker/README.md +++ b/worker/README.md @@ -6,3 +6,6 @@ http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test + + +http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-package From ce1ed75d22de3f39e86bdbad0587970bc12f9a30 Mon Sep 17 00:00:00 2001 From: javier <74383159+quieroSer@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:27:39 -0300 Subject: [PATCH 16/26] . --- worker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/worker/README.md b/worker/README.md index 52e8fcfcdc..2ba4941630 100644 --- a/worker/README.md +++ b/worker/README.md @@ -2,6 +2,7 @@ + http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build From 67f15f4fe5443b3eaae53bd8f9abcc2a342e39e1 Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 16:36:28 -0300 Subject: [PATCH 17/26] test --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index d8cc6e49b8..b8ad8a94af 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ Example Voting App ========= - - Getting started --------------- From 3e9dcdbafe5bbd9a4a0c71296a1f49462a04be35 Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 18:31:53 -0300 Subject: [PATCH 18/26] added Jenkinsfile for worker with build job --- worker/Jenkinsfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 worker/Jenkinsfile diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile new file mode 100644 index 0000000000..b8740136eb --- /dev/null +++ b/worker/Jenkinsfile @@ -0,0 +1,36 @@ +pipeline { + agent any + + tools{ + maven "maven 3.8.6" + } + stages { + stage('Build') { + steps { + echo 'Compiling worker app' + dir('worker'){ + sh 'mvn compile' + } + } + } + stage('Test') { + steps { + echo 'Running Unit Tests on worker app' + } + } + stage('Package') { + steps { + echo 'Package worker app' + } + } + } + + post { + always{ + echo 'Build pipeline run is completed.' + } + } +} + + + From a55275bb27947b6975482ecdd84597f3021e169e Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:18:54 -0300 Subject: [PATCH 19/26] added test and package jobs to worker pipeline --- worker/Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index b8740136eb..1589c50d69 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -16,11 +16,17 @@ pipeline { stage('Test') { steps { echo 'Running Unit Tests on worker app' + dir('worker'){ + sh 'mvn clean test' + } } } stage('Package') { steps { echo 'Package worker app' + dir('worker'){ + sh 'mvn package' + } } } } From 20faff01987ce83c49fcdb604fdd6b05327ad888 Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:29:59 -0300 Subject: [PATCH 20/26] archive artifacts and skip tests during package --- worker/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 1589c50d69..5022f7b136 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { steps { echo 'Package worker app' dir('worker'){ - sh 'mvn package' + sh 'mvn package -DskipTests' } } } @@ -33,6 +33,7 @@ pipeline { post { always{ + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true echo 'Build pipeline run is completed.' } } From 314f4f925c9e91621537f892df3ea6c390403adf Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:44:18 -0300 Subject: [PATCH 21/26] added some conditions --- worker/Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 5022f7b136..8d8acb8321 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -6,6 +6,9 @@ pipeline { } stages { stage('Build') { + when{ + changeset '**/wroker/**' + } steps { echo 'Compiling worker app' dir('worker'){ @@ -14,6 +17,9 @@ pipeline { } } stage('Test') { + when{ + changeset '**/wroker/**' + } steps { echo 'Running Unit Tests on worker app' dir('worker'){ @@ -22,6 +28,10 @@ pipeline { } } stage('Package') { + when{ + branch 'master' + changeset '**/wroker/**' + } steps { echo 'Package worker app' dir('worker'){ From 5818c54bfc15c00404d7dc89c4d19753835c0b9e Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:47:54 -0300 Subject: [PATCH 22/26] added some conditions --- worker/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 8d8acb8321..bcff54e05d 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { stages { stage('Build') { when{ - changeset '**/wroker/**' + changeset "**/wroker/**" } steps { echo 'Compiling worker app' @@ -18,7 +18,7 @@ pipeline { } stage('Test') { when{ - changeset '**/wroker/**' + changeset "**/wroker/**" } steps { echo 'Running Unit Tests on worker app' @@ -30,7 +30,7 @@ pipeline { stage('Package') { when{ branch 'master' - changeset '**/wroker/**' + changeset "**/wroker/**" } steps { echo 'Package worker app' From 87813c7588cfec4afd09fa3b12a0ee4f992e5055 Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:52:21 -0300 Subject: [PATCH 23/26] added some conditions --- worker/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index bcff54e05d..d1f84b591f 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -36,6 +36,7 @@ pipeline { echo 'Package worker app' dir('worker'){ sh 'mvn package -DskipTests' + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true } } } @@ -43,7 +44,6 @@ pipeline { post { always{ - archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true echo 'Build pipeline run is completed.' } } From 8adbce1c183377ffb4731668efa91fdf659a55fe Mon Sep 17 00:00:00 2001 From: quieroSer Date: Wed, 5 Oct 2022 19:54:52 -0300 Subject: [PATCH 24/26] corrected wroker to worker --- worker/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index d1f84b591f..058a6a0153 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { stages { stage('Build') { when{ - changeset "**/wroker/**" + changeset "**/worker/**" } steps { echo 'Compiling worker app' @@ -18,7 +18,7 @@ pipeline { } stage('Test') { when{ - changeset "**/wroker/**" + changeset "**/worker/**" } steps { echo 'Running Unit Tests on worker app' @@ -30,7 +30,7 @@ pipeline { stage('Package') { when{ branch 'master' - changeset "**/wroker/**" + changeset "**/worker/**" } steps { echo 'Package worker app' From 92ead83b2d8a3b2dbe7b999e97ae429c65b1307e Mon Sep 17 00:00:00 2001 From: quieroSer Date: Sun, 9 Oct 2022 11:09:11 -0300 Subject: [PATCH 25/26] added jenkins file for result app --- result/Jenkinsfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 result/Jenkinsfile diff --git a/result/Jenkinsfile b/result/Jenkinsfile new file mode 100644 index 0000000000..3a38ecc952 --- /dev/null +++ b/result/Jenkinsfile @@ -0,0 +1,41 @@ +pipeline { + agent any + + tools{ + nodejs "node 8.9.0" + } + stages { + stage('Build') { + when{ + changeset "**/result/**" + } + steps { + echo 'Compiling result app' + dir('result'){ + sh 'npm install' + } + } + } + stage('Test') { + when{ + changeset "**/result/**" + } + steps { + echo 'Running Unit Tests on result app' + dir('result'){ + sh 'npm install' + sh 'npm test' + } + } + } + } + + post { + always{ + echo 'Build pipeline run is completed.' + } + } +} + + + From bb583bfc7116c622074f8e130cd7942bc18046b2 Mon Sep 17 00:00:00 2001 From: quieroSer Date: Sun, 9 Oct 2022 11:22:07 -0300 Subject: [PATCH 26/26] added a 5th mock test --- result/test/mock.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/result/test/mock.test.js b/result/test/mock.test.js index f99dfdae97..793ee9f305 100644 --- a/result/test/mock.test.js +++ b/result/test/mock.test.js @@ -26,4 +26,9 @@ describe('mock test 4', () => { }); }); +describe('mock test 5', () => { + it('unit test 5', () => { + expect(true).to.be.true; + }); +});