From 8f7fcd7f746f61ba310ada8d3d52f714e044edf6 Mon Sep 17 00:00:00 2001 From: mawusix Date: Mon, 30 Oct 2023 14:04:09 +0000 Subject: [PATCH 1/3] Commit 1 - new name --- src/main/java/com/qa/App.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/qa/App.java b/src/main/java/com/qa/App.java index b051324d..fa3432c7 100644 --- a/src/main/java/com/qa/App.java +++ b/src/main/java/com/qa/App.java @@ -13,6 +13,7 @@ public static void main( String[] args ) System.out.println(sayHelloToSomeone("Bob")); System.out.println(sayHelloToSomeone("Charlie")); System.out.println(sayHelloToSomeone("Zena")); + System.out.println(sayHelloToSomeone("Mawusi")); System.out.println(sayGoodbye()); } From e512c7679e2f627eedf4584eb8cee22e0449bc3e Mon Sep 17 00:00:00 2001 From: mawusix <117100042+mawusix@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:21:35 +0000 Subject: [PATCH 2/3] Create Jenkinsfile --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..45106cb5 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "M3" + } + + stages { + stage('Checkout') { + steps { + // Get some code from a GitHub repository + + git branch: 'main', url: 'https://github.com/mawusix/lbg-hello-world-maven.git' + } + } + stage('Compile') { + steps { + // Run Maven on a Unix agent. + sh "mvn clean compile" + } + } + stage('Test'){ + steps{ + sh "mvn test" + } + } + stage("Package"){ + steps{ + sh "mvn -Dmaven.test.skip package -Dmaven.compile.skip package" + } + } + } +} From 3eb763c7cfe5bd141fa0445c6724a99e360213b5 Mon Sep 17 00:00:00 2001 From: mawusix Date: Mon, 30 Oct 2023 15:04:08 +0000 Subject: [PATCH 3/3] Commit 2 - add Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 45106cb5..6dce0637 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent any tools { - // Install the Maven version configured as "M3" and add it to the path. + // Install the Maven version configured as "M3" and add it to the path maven "M3" } @@ -16,7 +16,7 @@ pipeline { } stage('Compile') { steps { - // Run Maven on a Unix agent. + // Run Maven on a Unix agent sh "mvn clean compile" } }