From afd1e6fd6798992d956ee1d5d7b01c25f8f4ccda Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:09:34 -0500 Subject: [PATCH 01/31] Create 15Nov24.md created new file Signed-off-by: chilikm4n --- 15Nov24.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 15Nov24.md diff --git a/15Nov24.md b/15Nov24.md new file mode 100644 index 00000000..ed90e6f3 --- /dev/null +++ b/15Nov24.md @@ -0,0 +1,2 @@ +*test 15Nov24** +webhook test From eff8e658f48f48569f11a4cfd802f2015eb9fff6 Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:18:05 -0500 Subject: [PATCH 02/31] Update README.md Embeddable build status test Signed-off-by: chilikm4n --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b8ad8a94..b42c0067 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. + +[http://****/github-webhook/](http://34.48.26.32:8080/github-webhook/) From c368d7acc61eb6fe1df33b636a7f2b1a475db37e Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:22:08 -0500 Subject: [PATCH 03/31] Update README.md embedded build status Signed-off-by: chilikm4n --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b42c0067..330d6e5a 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,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. [http://****/github-webhook/](http://34.48.26.32:8080/github-webhook/) +http://34.48.26.32:8080/github-webhook/ From 60ff2c5f4687464bd0c9e60472b63f1fa73d5d11 Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:23:58 -0500 Subject: [PATCH 04/31] Update README.md rm embeddable build status Signed-off-by: chilikm4n --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 330d6e5a..a743e532 100644 --- a/README.md +++ b/README.md @@ -59,5 +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. -[http://****/github-webhook/](http://34.48.26.32:8080/github-webhook/) -http://34.48.26.32:8080/github-webhook/ + From c834daee5cce2b4e907c8d7ca1f74a890f44120a Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:27:37 -0500 Subject: [PATCH 05/31] Update README.md corrected link? Embeddable build statuss Signed-off-by: chilikm4n --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a743e532..69303338 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Architecture Note ---- +[![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://34.48.26.32:8080/job/instavote/job/worker-build/) + The voting application only accepts one vote per client. It does not register votes if a vote has already been submitted from a client. From 1dcddd201e9b1bd79ec63007ead91eade342998e Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:31:31 -0500 Subject: [PATCH 06/31] Update README.md embedded build status Signed-off-by: chilikm4n --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 69303338..7abc69f6 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,6 @@ Architecture Note ---- -[![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://34.48.26.32:8080/job/instavote/job/worker-build/) - -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://34.48.26.32:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://34.48.26.32:8080/job/instavote/job/worker-build/) From 40cf27531e57218f74dd9631054ee2f6002dd477 Mon Sep 17 00:00:00 2001 From: chilikm4n Date: Fri, 15 Nov 2024 11:39:52 -0500 Subject: [PATCH 07/31] Update README.md unit test Embeddable Build Status Signed-off-by: chilikm4n --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7abc69f6..7ccb80df 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,5 @@ Note [![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://34.48.26.32:8080/job/instavote/job/worker-build/) +[![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote&subject=Unittest%2Fworker-test)](http://34.48.26.32:8080/job/instavote/job/worker-test/) + From 8286772e62ca2b2838ab0975b4e0b50294b9dad1 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 20:26:47 +0000 Subject: [PATCH 08/31] added application info --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7ccb80df..144066ea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ +filename: README.md + Example Voting App ========= +This is a sample voting app. + Getting started --------------- From 363d00ab9fc898b12d49ae8a536f5119209b3209 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 21:18:36 +0000 Subject: [PATCH 09/31] added Jenkinsfile for worker with build job --- worker/Jenkinsfile | 69 +++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index b66016b2..27bf8f20 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -1,41 +1,34 @@ -pipeline { - agent{ - docker{ - image 'maven:3.9.8-sapmachine-21' - args '-v $HOME/.m2:/root/.m2' - } - } - stages{ - stage('build'){ - steps{ - echo 'building 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 into a jarfile' - dir('worker'){ - sh 'mvn package -DskipTests' - archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true - } - } - } +pipeline { + agent any + + tools{ + maven 'maven 3.9.8' } - post{ - always{ - echo 'the job is complete' + stages{ + stage("build"){ + steps{ + echo 'Compiling worker app' + dir('worker'){ + sh 'mvn compile' + } + } + } + stage("test"){ + steps{ + echo 'Running Unit Test on worker app' + } + + stage("packaging"){ + steps{ + echo 'Packaging worker app' + } + } + } + post{ + always{ + echo 'Building multibranch pipeline for worker is completed..' + } + } } - } -} + From 15ff70689d3c5b46efae5d4f2e80fbfefe4d8cf0 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 21:36:19 +0000 Subject: [PATCH 10/31] line 35 error looking for '}'; added --- worker/Jenkinsfile | 2 +- worker/Jenkinsfile_original | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 worker/Jenkinsfile_original diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 27bf8f20..86b11cd3 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -31,4 +31,4 @@ pipeline { } } } - +} diff --git a/worker/Jenkinsfile_original b/worker/Jenkinsfile_original new file mode 100644 index 00000000..b66016b2 --- /dev/null +++ b/worker/Jenkinsfile_original @@ -0,0 +1,41 @@ +pipeline { + agent{ + docker{ + image 'maven:3.9.8-sapmachine-21' + args '-v $HOME/.m2:/root/.m2' + } + } + stages{ + stage('build'){ + steps{ + echo 'building 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 into a jarfile' + dir('worker'){ + sh 'mvn package -DskipTests' + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true + } + } + } + } + post{ + always{ + echo 'the job is complete' + + } + } +} From b9ef35dc2cde5254e262ba4b9db2c96d608b08ab Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 21:39:33 +0000 Subject: [PATCH 11/31] revisit original Jenkinsfile --- worker/Jenkinsfile | 67 ++++++++++++++++++++++------------------ worker/Jenkinsfile_build | 34 ++++++++++++++++++++ 2 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 worker/Jenkinsfile_build diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 86b11cd3..b66016b2 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -1,34 +1,41 @@ -pipeline { - agent any - - tools{ - maven 'maven 3.9.8' +pipeline { + agent{ + docker{ + image 'maven:3.9.8-sapmachine-21' + args '-v $HOME/.m2:/root/.m2' + } + } + stages{ + stage('build'){ + steps{ + echo 'building 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 into a jarfile' + dir('worker'){ + sh 'mvn package -DskipTests' + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true + } + } + } } + post{ + always{ + echo 'the job is complete' - stages{ - stage("build"){ - steps{ - echo 'Compiling worker app' - dir('worker'){ - sh 'mvn compile' - } - } - } - stage("test"){ - steps{ - echo 'Running Unit Test on worker app' - } - - stage("packaging"){ - steps{ - echo 'Packaging worker app' - } - } - } - post{ - always{ - echo 'Building multibranch pipeline for worker is completed..' - } - } } + } } diff --git a/worker/Jenkinsfile_build b/worker/Jenkinsfile_build new file mode 100644 index 00000000..86b11cd3 --- /dev/null +++ b/worker/Jenkinsfile_build @@ -0,0 +1,34 @@ +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 Test on worker app' + } + + stage("packaging"){ + steps{ + echo 'Packaging worker app' + } + } + } + post{ + always{ + echo 'Building multibranch pipeline for worker is completed..' + } + } + } +} From 889181b5ff732cf3a3e0c86380c05eb396cf9a69 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 21:44:54 +0000 Subject: [PATCH 12/31] revert back to Jenkinsfile_build w/ minor revisions to '}' and text --- worker/Jenkinsfile | 70 +++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index b66016b2..4c788146 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -1,41 +1,35 @@ -pipeline { - agent{ - docker{ - image 'maven:3.9.8-sapmachine-21' - args '-v $HOME/.m2:/root/.m2' - } - } - stages{ - stage('build'){ - steps{ - echo 'building 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 into a jarfile' - dir('worker'){ - sh 'mvn package -DskipTests' - archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true - } - } - } +pipeline { + agent any + + tools{ + maven 'maven 3.9.8' } - post{ - always{ - echo 'the job is complete' + stages{ + stage("build"){ + steps{ + echo 'Compiling worker app' + dir('worker'){ + sh 'mvn compile' + } + } + } + stage("test"){ + steps{ + echo 'Running Unit Test on worker app' + } + } + + stage("package"){ + steps{ + echo 'Packaging worker app' + } + } + } + post{ + always{ + echo 'Building multibranch pipeline for worker is completed..' + } + } } - } -} + From a25d413dba764e64530e92247bb5e63aa3cf7f73 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 21:48:01 +0000 Subject: [PATCH 13/31] per console output capitalize Maven 3.9.8 --- worker/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 4c788146..98f3a9e9 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any tools{ - maven 'maven 3.9.8' + maven 'Maven 3.9.8' } stages{ From 8a8e7b4250522d08debab23627d3ffbbe1462e69 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 22:09:49 +0000 Subject: [PATCH 14/31] 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 98f3a9e9..08f7b36c 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -17,12 +17,18 @@ pipeline { stage("test"){ steps{ echo 'Running Unit Test on worker app' + dir('worker'){ + sh 'mvn clean test' + } } } stage("package"){ steps{ echo 'Packaging worker app' + dir('worker'){ + sh 'mvn package' + } } } } From 8c17b45eed4aa4dd6bfa4fefa890d52dc0d22a40 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Fri, 15 Nov 2024 22:16:57 +0000 Subject: [PATCH 15/31] archive artifacts, skip test and package --- worker/Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 08f7b36c..1dd2392f 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -27,13 +27,15 @@ pipeline { steps{ echo 'Packaging worker app' dir('worker'){ - sh 'mvn package' + sh 'mvn package -DskipTests' } } } } post{ always{ + archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true + echo 'Building multibranch pipeline for worker is completed..' } } From 513538d84113d4438e6249fc83dcdaf60f575b2c Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 09:54:35 -0500 Subject: [PATCH 16/31] 16Nov24-repairBranch created, Jenkinsfile_16Nov24p24State before editing Jenkinsfile, notes_repair to monitor and record steps --- notes_repair_16Nov24.md | 13 +++++++++ worker/Jenkinsfile_16Nov24p24State | 43 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 notes_repair_16Nov24.md create mode 100644 worker/Jenkinsfile_16Nov24p24State diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md new file mode 100644 index 00000000..3de7e28e --- /dev/null +++ b/notes_repair_16Nov24.md @@ -0,0 +1,13 @@ +Sat Nov 16 09:46:06 EST 2024 ++ [x] determine where to revert back to + - lab7-1:p10 ++ [x] create repair branch ++ [x] git directory to push: this directory + - contains commits from the lab + - the only main differences between each directories were the: + - Jenkinsfile(s) + - README.md + - All other files were alike +*to the best of my knowledge* ++ [x] Jenkins setup already done ++ [x] git setup already done diff --git a/worker/Jenkinsfile_16Nov24p24State b/worker/Jenkinsfile_16Nov24p24State new file mode 100644 index 00000000..1dd2392f --- /dev/null +++ b/worker/Jenkinsfile_16Nov24p24State @@ -0,0 +1,43 @@ +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 Test on worker app' + dir('worker'){ + sh 'mvn clean test' + } + } + } + + stage("package"){ + steps{ + echo 'Packaging worker app' + dir('worker'){ + sh 'mvn package -DskipTests' + } + } + } + } + post{ + always{ + archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true + + echo 'Building multibranch pipeline for worker is completed..' + } + } + } + From eb89bfdafc27d61a9ac5ea9808f3cb8d6076e184 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 09:59:21 -0500 Subject: [PATCH 17/31] repair-branch: Jenkinsfile for worker with build job --- worker/Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 1dd2392f..f82b51d3 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -17,24 +17,24 @@ pipeline { stage("test"){ steps{ echo 'Running Unit Test on worker app' - dir('worker'){ - sh 'mvn clean test' - } + // dir('worker'){ + // sh 'mvn clean test' + // } } } stage("package"){ steps{ echo 'Packaging worker app' - dir('worker'){ - sh 'mvn package -DskipTests' - } + // dir('worker'){ + // sh 'mvn package -DskipTests' + // } } } } post{ always{ - archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true + // archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true echo 'Building multibranch pipeline for worker is completed..' } From 9b8b6c1de56fd90bf60f09fd6b77714b2e53a2ab Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 10:29:37 -0500 Subject: [PATCH 18/31] repair: installed 'missing' Docker plugins: Docker and Docker Pipeline: refer to repair notes; test master fail, worker-pipe ok --- notes_repair_16Nov24.md | 119 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index 3de7e28e..278da9dc 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -1,4 +1,123 @@ Sat Nov 16 09:46:06 EST 2024 + +http://34.48.26.32:8080/job/instavote/job/worker-pipe/job/master/3/console + ``` + Started by user admin + 15:07:59 Connecting to https://api.github.com using chilikm4n/****** + Obtained worker/Jenkinsfile from f85634240458a7a200a702176755ee2149e35bd8 + org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: + WorkflowScript: 3: Invalid agent type "docker" specified. Must be one of [any, label, none] @ line 3, column 8. + docker{ + ^ + + 1 error + + at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309) + at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1107) + at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624) + at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602) + at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579) + at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323) + at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293) + at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox$Scope.parse(GroovySandbox.java:163) + at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:190) + at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:175) + at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:652) + at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:598) + at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:335) + at hudson.model.ResourceController.execute(ResourceController.java:101) + at hudson.model.Executor.run(Executor.java:442) + + GitHub has been notified of this commit’s build result + + Finished: FAILURE + + ``` +**POTENTIAL SOLUTIONS**: +https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fix-Jenkins-Invalid-agent-type-Docker-specified-any-label-none-error + - **MAIN POINTS**: missing... + - Jenkins Docker Plugin + - Jenkins Docker Pipeline plugini + + **INSTALLED** + - [x] Docker Pipeline 580.vc0c340686b_54 + - [x] Docker plugin 1.6.2 + + [ ] resolves issue? + + [x] feature/workpipe builds (#14) + - [ ] master + + + ``` + Started by user admin + 15:21:52 Connecting to https://api.github.com using chilikm4n/****** + Obtained worker/Jenkinsfile from f85634240458a7a200a702176755ee2149e35bd8 + [Pipeline] Start of Pipeline + [Pipeline] node + Running on Jenkins in /var/jenkins_home/workspace/instavote_worker-pipe_master + [Pipeline] { + [Pipeline] stage + [Pipeline] { (Declarative: Checkout SCM) + [Pipeline] checkout + The recommended git tool is: NONE + using credential 7447b235-b3ee-4c12-b034-b133cb332a41 + Cloning the remote Git repository + Cloning with configured refspecs honoured and without tags + Cloning repository https://github.com/chilikm4n/LFS261-example-voting-app.git + > git init /var/jenkins_home/workspace/instavote_worker-pipe_master # timeout=10 + Fetching upstream changes from https://github.com/chilikm4n/LFS261-example-voting-app.git + > git --version # timeout=10 + > git --version # 'git version 2.39.2' + using GIT_ASKPASS to set credentials + > git fetch --no-tags --force --progress -- https://github.com/chilikm4n/LFS261-example-voting-app.git +refs/heads/master:refs/remotes/origin/master # timeout=10 + > git config remote.origin.url https://github.com/chilikm4n/LFS261-example-voting-app.git # timeout=10 + > git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10 + Avoid second fetch + Checking out Revision f85634240458a7a200a702176755ee2149e35bd8 (master) + > git config core.sparsecheckout # timeout=10 + > git checkout -f f85634240458a7a200a702176755ee2149e35bd8 # timeout=10 + Commit message: "Merge pull request #1 from chilikm4n/readme" + First time build. Skipping changelog. + [Pipeline] } + [Pipeline] // stage + [Pipeline] withEnv + [Pipeline] { + [Pipeline] isUnix + [Pipeline] withEnv + [Pipeline] { + [Pipeline] sh + + docker inspect -f . maven:3.9.8-sapmachine-21 + + error during connect: Get "https://docker:2376/v1.47/containers/maven:3.9.8-sapmachine-21/json": dial tcp: lookup docker on 127.0.0.11:53: server misbehaving + [Pipeline] isUnix + [Pipeline] withEnv + [Pipeline] { + [Pipeline] sh + + docker pull maven:3.9.8-sapmachine-21 + error during connect: Post "https://docker:2376/v1.47/images/create?fromImage=maven&tag=3.9.8-sapmachine-21": dial tcp: lookup docker on 127.0.0.11:53: server misbehaving + [Pipeline] } + [Pipeline] // withEnv + [Pipeline] } + [Pipeline] // withEnv + [Pipeline] } + [Pipeline] // withEnv + [Pipeline] } + [Pipeline] // node + [Pipeline] stage + [Pipeline] { (Declarative: Post Actions) + [Pipeline] echo + the job is complete + [Pipeline] } + [Pipeline] // stage + [Pipeline] End of Pipeline + ERROR: script returned exit code 1 + + GitHub has been notified of this commit’s build result + + Finished: FAILURE + + ``` + + +____ + [x] determine where to revert back to - lab7-1:p10 + [x] create repair branch From 8439dcdfa2cff6a7b058261ba0b85b68e9d6ee99 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 10:37:07 -0500 Subject: [PATCH 19/31] repair: changed Jenkinsfile Maven => maven version --- notes_repair_16Nov24.md | 5 +++-- worker/Jenkinsfile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index 278da9dc..d827a5eb 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -43,8 +43,9 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi - [x] Docker plugin 1.6.2 + [ ] resolves issue? + [x] feature/workpipe builds (#14) - - [ ] master - + - [ ] master: fail [x] attempt: (#4) + + [ ] `Jenkinsfile` "Maven" => "maven" + ``` Started by user admin diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index f82b51d3..e8c0c1aa 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any tools{ - maven 'Maven 3.9.8' + maven 'maven 3.9.8' } stages{ From 2d50a717060073ab66f2123a5e1d2d4e984d4901 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 11:10:40 -0500 Subject: [PATCH 20/31] repair: for shits and giggles, commented out build status in proj top level dir and worker/ README.md --- README.md | 4 ++-- notes_repair_16Nov24.md | 12 ++++++++++-- worker/README.md | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 144066ea..4a053217 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Note ---- -[![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote%2Fworker-build)](http://34.48.26.32:8080/job/instavote/job/worker-build/) + -[![Build Status](http://34.48.26.32:8080/buildStatus/icon?job=instavote&subject=Unittest%2Fworker-test)](http://34.48.26.32:8080/job/instavote/job/worker-test/) + diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index d827a5eb..d2cbf538 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -44,8 +44,16 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi + [ ] resolves issue? + [x] feature/workpipe builds (#14) - [ ] master: fail [x] attempt: (#4) - + [ ] `Jenkinsfile` "Maven" => "maven" - + + [?] `Jenkinsfile` "Maven" => "maven" + - [x] attempted fail (#5) + - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` + ``` + avirtualrealitystory@ci-4nov24:~/06/lfx261/15Nov24a$ sudo docker inspect -f . mav + en:3.9.8-sapmachine-21 + Error: No such object: maven:3.9.8-sapmachine-21 + + ``` +____ ``` Started by user admin diff --git a/worker/README.md b/worker/README.md index 834be372..46451ca5 100644 --- a/worker/README.md +++ b/worker/README.md @@ -1,5 +1,5 @@ ## Worker Java App * Build Status -[![Build Status](http://35.197.102.152:8080/buildStatus/icon?job=job-01)](http://35.197.102.152:8080/job/job-01/) -[![Build Status](http://35.197.102.152:8080/buildStatus/icon?job=job-02&subject=UnitTest)](http://35.197.102.152:8080/job/job-02/) + + From bafbde15aa906ae950c16776bef6b933c5ab7550 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 11:18:24 -0500 Subject: [PATCH 21/31] repair: revert Jenkinsfile maven to Maven; notes update of build failure #16/17 --- notes_repair_16Nov24.md | 1 + worker/Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index d2cbf538..4b2253ca 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -47,6 +47,7 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi + [?] `Jenkinsfile` "Maven" => "maven" - [x] attempted fail (#5) - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` + - [x] they both failed (#16/17) complaining about "Maven" ``` avirtualrealitystory@ci-4nov24:~/06/lfx261/15Nov24a$ sudo docker inspect -f . mav en:3.9.8-sapmachine-21 diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index e8c0c1aa..f82b51d3 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any tools{ - maven 'maven 3.9.8' + maven 'Maven 3.9.8' } stages{ From b48b7c15c29bf67ea8a6cdb44c4ff9defefb1367 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 11:47:12 -0500 Subject: [PATCH 22/31] before pushing to master --- notes_repair_16Nov24.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index 4b2253ca..bf40f26a 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -48,6 +48,8 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi - [x] attempted fail (#5) - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` - [x] they both failed (#16/17) complaining about "Maven" + - [ ] attempt update master + ``` avirtualrealitystory@ci-4nov24:~/06/lfx261/15Nov24a$ sudo docker inspect -f . mav en:3.9.8-sapmachine-21 From 45d7e1c9794632d86bd8df6b33d4a3df3bf5298d Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 11:48:57 -0500 Subject: [PATCH 23/31] before merge to master --- notes_repair_16Nov24.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index bf40f26a..35cf0576 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -48,7 +48,7 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi - [x] attempted fail (#5) - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` - [x] they both failed (#16/17) complaining about "Maven" - - [ ] attempt update master + - [ ] attempt update master: get merge first ``` avirtualrealitystory@ci-4nov24:~/06/lfx261/15Nov24a$ sudo docker inspect -f . mav From 4fce9ac80e8f70512414a0556ac092c17c0cd47e Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 11:52:04 -0500 Subject: [PATCH 24/31] repair: need to do pr before pushing to master --- notes_repair_16Nov24.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index 35cf0576..23e4632c 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -49,6 +49,25 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` - [x] they both failed (#16/17) complaining about "Maven" - [ ] attempt update master: get merge first + ``` + chilikm4n/LFS261-example-voting-app.git master + Enumerating objects: 8, done. + Counting objects: 100% (8/8), done. + Delta compression using up to 2 threads + Compressing objects: 100% (6/6), done. + Writing objects: 100% (6/6), 600 bytes | 600.00 KiB/s, done. + Total 6 (delta 4), reused 0 (delta 0), pack-reused 0 + remote: Resolving deltas: 100% (4/4), completed with 2 local objects. + remote: error: GH006: Protected branch update failed for refs/heads/master. + remote: + remote: - Changes must be made through a pull request. + To https://github.com/chilikm4n/LFS261-example-voting-app.git + ! [remote rejected] master -> master (protected branch hook declined) + error: failed to push some refs to 'https://github.com/chilikm4n/LFS261-example-voting-app.git' + + ``` + +____ ``` avirtualrealitystory@ci-4nov24:~/06/lfx261/15Nov24a$ sudo docker inspect -f . mav From f5ca20f877292d3de45d0431ed5afa17e8d5995e Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 16:08:53 -0500 Subject: [PATCH 25/31] repair: added notes: about Dockerfile; w --- notes_repair_16Nov24.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notes_repair_16Nov24.md b/notes_repair_16Nov24.md index 23e4632c..987f4b52 100644 --- a/notes_repair_16Nov24.md +++ b/notes_repair_16Nov24.md @@ -49,6 +49,10 @@ https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Fi - [x] check: `docker inspect -f . maven:3.9.8-sapmachine-21` - [x] they both failed (#16/17) complaining about "Maven" - [ ] attempt update master: get merge first + - [16Nov24 15:45] requires a pull request; pr made + - [x] pulled images maven:3.9.8; results still show not able to do + - [ ] change Dockerfile + - [ ] change Jenkinsfile ``` chilikm4n/LFS261-example-voting-app.git master Enumerating objects: 8, done. From 22577301d0b8a50c4e7f3dc9d3f37a1ca536c7af Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sat, 16 Nov 2024 16:10:41 -0500 Subject: [PATCH 26/31] rm maven:3.9.8... from Dockerfile --- worker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/Dockerfile b/worker/Dockerfile index 2b152eab..250a3df5 100644 --- a/worker/Dockerfile +++ b/worker/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.9.8-sapmachine-21 +FROM maven:3.9.8 WORKDIR /app COPY . . RUN mvn package && \ From 5fab445e3732753bb5793911193494ef03e3bd14 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sun, 17 Nov 2024 10:52:12 -0500 Subject: [PATCH 27/31] p23:repaired16Nov25:archive artifacts, skip test and package --- worker/Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index f82b51d3..1dd2392f 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -17,24 +17,24 @@ pipeline { stage("test"){ steps{ echo 'Running Unit Test on worker app' - // dir('worker'){ - // sh 'mvn clean test' - // } + dir('worker'){ + sh 'mvn clean test' + } } } stage("package"){ steps{ echo 'Packaging worker app' - // dir('worker'){ - // sh 'mvn package -DskipTests' - // } + dir('worker'){ + sh 'mvn package -DskipTests' + } } } } post{ always{ - // archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true + archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true echo 'Building multibranch pipeline for worker is completed..' } From 03a3beb1a216c53609608e4dfa11f76e178841cf Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sun, 17 Nov 2024 10:55:56 -0500 Subject: [PATCH 28/31] archiveArtifacts(s) fix in Jenkinsfile --- worker/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 1dd2392f..ba59dc25 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { } post{ always{ - archiveArtifactss artifacts: '**/target/*.jar', fingerprint: true + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true echo 'Building multibranch pipeline for worker is completed..' } From 578e6bf433eff550d5778cdca7452ab072937aa7 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sun, 17 Nov 2024 11:37:05 -0500 Subject: [PATCH 29/31] adding Jenkinsfile for result app --- result/Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 result/Jenkinsfile diff --git a/result/Jenkinsfile b/result/Jenkinsfile new file mode 100644 index 00000000..85947c0b --- /dev/null +++ b/result/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools{ + nodejs 'NodeJS 22.4.0' + } + + stages{ + stage(build){ + when{ + changeset "**/result**" + } + steps{ + echo 'Compiling result app..' + dir('worker'){ + sh 'npm install' + } + } + } + stage(test){ + when{ + changeset"**/result/** + } + steps{ + echo 'Running Unit Tests on results app..' + dir('result'){ + sh 'npm install' + sh 'npm test' + } + } + } + } + +} From 78c208a3a35b16bc5f97bf9f7ffc0285da9c4dcc Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sun, 17 Nov 2024 11:43:12 -0500 Subject: [PATCH 30/31] results:NodeJS cleanup Jenkinsfile charset spacing of quote --- result/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result/Jenkinsfile b/result/Jenkinsfile index 85947c0b..74528985 100644 --- a/result/Jenkinsfile +++ b/result/Jenkinsfile @@ -19,7 +19,7 @@ pipeline { } stage(test){ when{ - changeset"**/result/** + changeset "**/result/** } steps{ echo 'Running Unit Tests on results app..' From 3b845de3a2aa9d6bda8926ca3f168be2e6e95a24 Mon Sep 17 00:00:00 2001 From: chiliphrosting Date: Sun, 17 Nov 2024 12:33:53 -0500 Subject: [PATCH 31/31] missing quote fix --- result/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result/Jenkinsfile b/result/Jenkinsfile index 74528985..9ae542e2 100644 --- a/result/Jenkinsfile +++ b/result/Jenkinsfile @@ -19,7 +19,7 @@ pipeline { } stage(test){ when{ - changeset "**/result/** + changeset "**/result/**" } steps{ echo 'Running Unit Tests on results app..'