From cbecbb0a4336f1b9cefd99cebe965338a9ee3e9c Mon Sep 17 00:00:00 2001 From: aasislopez <156607659+aasislopez@users.noreply.github.com> Date: Fri, 26 Dec 2025 12:33:09 +0100 Subject: [PATCH 01/15] Create anto_test.txt Signed-off-by: aasislopez <156607659+aasislopez@users.noreply.github.com> --- anto_test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 anto_test.txt diff --git a/anto_test.txt b/anto_test.txt new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/anto_test.txt @@ -0,0 +1 @@ +test From 72fbbd18425ccba3c765957c5a6e9cd9be2ce7bf Mon Sep 17 00:00:00 2001 From: aasislopez <156607659+aasislopez@users.noreply.github.com> Date: Fri, 26 Dec 2025 12:48:24 +0100 Subject: [PATCH 02/15] Update README.md Antonio lab Signed-off-by: aasislopez <156607659+aasislopez@users.noreply.github.com> --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a8ee7312c..4fe1d833a 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,5 @@ Note ---- The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client. + +[![Build Status](http://127.0.0.1:8080/buildStatus/icon?job=instavote%2Fworker+build)](https://eighty-cobras-slide.loca.lt/job/instavote/job/worker%20build/) From bab3b0d19e128ecfb91968cd3954809ec01c3b73 Mon Sep 17 00:00:00 2001 From: aasislopez <156607659+aasislopez@users.noreply.github.com> Date: Fri, 26 Dec 2025 12:54:32 +0100 Subject: [PATCH 03/15] Update README.md AL lab2 Signed-off-by: aasislopez <156607659+aasislopez@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fe1d833a..1db563312 100644 --- a/README.md +++ b/README.md @@ -59,4 +59,4 @@ Note The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client. -[![Build Status](http://127.0.0.1:8080/buildStatus/icon?job=instavote%2Fworker+build)](https://eighty-cobras-slide.loca.lt/job/instavote/job/worker%20build/) +[![Build Status](https://eighty-cobras-slide.loca.lt/buildStatus/icon?job=instavote%2Fworker+build)](https://eighty-cobras-slide.loca.lt/job/instavote/job/worker%20build/) From 757eb6a8ada1f420f265a732d46a8966467f37f9 Mon Sep 17 00:00:00 2001 From: aasislopez <156607659+aasislopez@users.noreply.github.com> Date: Fri, 26 Dec 2025 13:13:03 +0100 Subject: [PATCH 04/15] Update README.md AL update LAB Signed-off-by: aasislopez <156607659+aasislopez@users.noreply.github.com> --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1db563312..83f83b162 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,5 @@ Note The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client. [![Build Status](https://eighty-cobras-slide.loca.lt/buildStatus/icon?job=instavote%2Fworker+build)](https://eighty-cobras-slide.loca.lt/job/instavote/job/worker%20build/) + +[![Build Status](https://eighty-cobras-slide.loca.lt/buildStatus/icon?job=instavote%2Fworker+test&subject=Unittest)](https://eighty-cobras-slide.loca.lt/job/instavote/job/worker%20test/) From 895219d3860d6b12debd0f60abc775a487c05836 Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 4 Jan 2026 16:24:57 +0000 Subject: [PATCH 05/15] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83f83b162..290cf62a9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Example Voting App +Example Voting App v1 ========= Getting started From 6af5aff78641df1fa2e99937fac2851d5c9e3d8d Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 08:57:36 +0000 Subject: [PATCH 06/15] AL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 290cf62a9..5f7a3f98b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Example Voting App v1 +Example Voting App, this is a sample voting App ========= Getting started From 760e5d1abc3c2ff98762ed50bf011c5db4ea37e9 Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 09:48:59 +0000 Subject: [PATCH 07/15] added Jenkinsfile for worker with build job --- worker/Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 worker/Jenkinsfile diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile new file mode 100644 index 000000000..58f550e25 --- /dev/null +++ b/worker/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + tools{ + maven 'maven 3.9.8' + } + 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 'Packaging worker app' + } + } + } + post{ + always{ + echo 'Building multibranch pipeline for worker is completed..' + } + } +} From 6e0dbee623c3ca0d65c50ece9e8bdafedf0ffcc1 Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 11:19:50 +0000 Subject: [PATCH 08/15] added Test and package job for worker pipeline --- worker/Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 58f550e25..af86f41c9 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -15,11 +15,17 @@ pipeline { stage("test"){ steps{ echo 'Running Unit Tests on worker app' + dir('worker'){ + sh 'mvn clean test' + } } } stage("package"){ steps{ echo 'Packaging worker app' + dir('worker'){ + sh 'mvn package' + } } } } From c76733b43d792538c14f8b90e36cc7273eab0af8 Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 11:25:20 +0000 Subject: [PATCH 09/15] archive artifacts, skip test and package --- worker/Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index af86f41c9..167e1ec2b 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -30,8 +30,10 @@ pipeline { } } post{ - always{ - echo 'Building multibranch pipeline for worker is completed..' + always{ + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: +true +echo 'Building multibranch pipeline for worker is completed..' } } } From 93326550ccaa6a0bb8267b63b0e92c438048e213 Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 11:35:24 +0000 Subject: [PATCH 10/15] run package step only on master, run stages only when worker changes --- worker/Jenkinsfile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 167e1ec2b..923146628 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -4,7 +4,11 @@ pipeline { maven 'maven 3.9.8' } stages{ - stage("build"){ + stage("build"){ + stage("build"){ + when{ + changeset "**/worker/**" + } steps{ echo 'Compiling worker app' dir('worker'){ @@ -12,7 +16,10 @@ pipeline { } } } - stage("test"){ + stage("test"){ + when{ + changeset "**/worker/**" + } steps{ echo 'Running Unit Tests on worker app' dir('worker'){ @@ -20,7 +27,11 @@ pipeline { } } } - stage("package"){ + stage("package"){ + when{ + branch 'master' + changeset "**/worker/**" + } steps{ echo 'Packaging worker app' dir('worker'){ From 4db30683e557957a6663da9a68a323e2a3094b0d Mon Sep 17 00:00:00 2001 From: antonio Date: Sun, 11 Jan 2026 11:44:24 +0000 Subject: [PATCH 11/15] run package step only on master, run stages only when worker changes fix --- worker/Jenkinsfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 923146628..c12ceba19 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -5,7 +5,6 @@ pipeline { } stages{ stage("build"){ - stage("build"){ when{ changeset "**/worker/**" } @@ -35,16 +34,16 @@ pipeline { steps{ echo 'Packaging worker app' dir('worker'){ - sh 'mvn package' - } + sh 'mvn package -DskipTests' + archiveArtifacts artifacts: '**/target/*.jar', +fingerprint: true } + } } } post{ always{ - archiveArtifacts artifacts: '**/target/*.jar', fingerprint: -true -echo 'Building multibranch pipeline for worker is completed..' + echo 'Building multibranch pipeline for worker is completed..' } } } From 07faaa39094b4827a2678aa579dd1bd86b7ff171 Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 14 Mar 2026 19:22:28 +0000 Subject: [PATCH 12/15] adding Jenkingsfile for result app --- result/Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 result/Jenkinsfile diff --git a/result/Jenkinsfile b/result/Jenkinsfile new file mode 100644 index 000000000..4b1963411 --- /dev/null +++ b/result/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + tools{ + maven 'NodeJS 22.4.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 + } + } + } + } +} From de434db953f137dcccdd08b943e074f2de029118 Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 14 Mar 2026 19:37:51 +0000 Subject: [PATCH 13/15] adding 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 aac871563..4a96f63cc 100644 --- a/result/test/mock.test.js +++ b/result/test/mock.test.js @@ -37,4 +37,9 @@ describe('mock test 6', () => { expect(true).to.be.true; }); }); +describe('mock test 7', () => { + it('unit test 7', () => { + expect(true).to.be.true; + }); +}); From e90ad89371862fec213b57669a2dab0d95baf08f Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 14 Mar 2026 21:42:29 +0000 Subject: [PATCH 14/15] fix Jenkinsfile for result app --- result/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result/Jenkinsfile b/result/Jenkinsfile index 4b1963411..72c1bbe27 100644 --- a/result/Jenkinsfile +++ b/result/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { echo 'Running Unit Tests on result app' dir('result'){ sh 'npm install' - sh 'npm test + sh 'npm test' } } } From b72541a4847a6f1c23d4575a6bfabbf13e9b875b Mon Sep 17 00:00:00 2001 From: antonio Date: Sat, 14 Mar 2026 21:45:38 +0000 Subject: [PATCH 15/15] fix Jenkinsfile for result app --- result/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result/Jenkinsfile b/result/Jenkinsfile index 72c1bbe27..05d440370 100644 --- a/result/Jenkinsfile +++ b/result/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any tools{ - maven 'NodeJS 22.4.0' + nodejs 'NodeJS 22.4.0' } stages{ stage("build"){