From 4ed887726ac2103aa9940675dc1345ea3954756c Mon Sep 17 00:00:00 2001 From: norahalr Date: Sun, 20 Jul 2025 14:41:32 +0300 Subject: [PATCH 1/6] added application info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a8ee7312..584e3917 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +2 TRY + Example Voting App ========= From 990ffa762f6e46f97f88174eaec40d7c67fba3d8 Mon Sep 17 00:00:00 2001 From: norahalr Date: Sun, 20 Jul 2025 15:02:36 +0300 Subject: [PATCH 2/6] added Jenkinsfile for worker with build job --- worker/Jenkinsfile.groovy | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 worker/Jenkinsfile.groovy diff --git a/worker/Jenkinsfile.groovy b/worker/Jenkinsfile.groovy new file mode 100644 index 00000000..e94d7c5a --- /dev/null +++ b/worker/Jenkinsfile.groovy @@ -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 5da7700627e5eeefa71cfe713a242de47b7d723a Mon Sep 17 00:00:00 2001 From: norahalr Date: Sun, 20 Jul 2025 15:16:31 +0300 Subject: [PATCH 3/6] added Test and package job for worker pipeline --- worker/Jenkinsfile.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worker/Jenkinsfile.groovy b/worker/Jenkinsfile.groovy index e94d7c5a..5773c20c 100644 --- a/worker/Jenkinsfile.groovy +++ b/worker/Jenkinsfile.groovy @@ -6,7 +6,7 @@ pipeline { stages { stage("build") { steps { - echo 'Compiling worker app' + echo 'Compiling worker app..' dir('worker') { sh 'mvn compile' } @@ -14,12 +14,18 @@ pipeline { } stage("test") { steps { - echo 'Running Unit Tests on worker app' + 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 a1fe8db689edfb492ab1cc34a601e95b1813cdbe Mon Sep 17 00:00:00 2001 From: norahalr Date: Sun, 20 Jul 2025 15:20:08 +0300 Subject: [PATCH 4/6] added Test and package job for worker pipeline --- worker/Jenkinsfile.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker/Jenkinsfile.groovy b/worker/Jenkinsfile.groovy index 5773c20c..d1a28890 100644 --- a/worker/Jenkinsfile.groovy +++ b/worker/Jenkinsfile.groovy @@ -24,13 +24,14 @@ pipeline { steps { echo 'Packaging worker app' dir('worker') { - sh 'mvn package' + sh 'mvn package -DskipTests' } } } } post { always { + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true echo 'Building multibranch pipeline for worker is completed..' } } From 93702d886f3baec4a31880784e386558d2956eb5 Mon Sep 17 00:00:00 2001 From: norahalr Date: Mon, 21 Jul 2025 09:09:47 +0300 Subject: [PATCH 5/6] adding Jenkinsfile for result app --- result/Jenkinsfile.groovy | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 result/Jenkinsfile.groovy diff --git a/result/Jenkinsfile.groovy b/result/Jenkinsfile.groovy new file mode 100644 index 00000000..d1a28890 --- /dev/null +++ b/result/Jenkinsfile.groovy @@ -0,0 +1,38 @@ +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..' + dir('worker') { + sh 'mvn clean test' + } + } + } + stage("package") { + steps { + echo 'Packaging worker app' + dir('worker') { + sh 'mvn package -DskipTests' + } + } + } + } + post { + always { + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true + echo 'Building multibranch pipeline for worker is completed..' + } + } +} From 344171a3f7532ce13a588cb7edc8412b9764c603 Mon Sep 17 00:00:00 2001 From: norahalr Date: Mon, 21 Jul 2025 09:14:17 +0300 Subject: [PATCH 6/6] adding mock test --- result/test/mock.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/result/test/mock.test.js b/result/test/mock.test.js index aac87156..716f6f5a 100644 --- a/result/test/mock.test.js +++ b/result/test/mock.test.js @@ -32,6 +32,7 @@ describe('mock test 5', () => { }); }); + describe('mock test 6', () => { it('unit test 6', () => { expect(true).to.be.true;