diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..6dce0637 --- /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" + } + } + } +} 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()); }