Created
June 12, 2024 14:45
-
-
Save harshakp06/c4760421ec04abacadcd8913f6288912 to your computer and use it in GitHub Desktop.
Jenkins file for Sample Maven App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
tools{ | |
jdk 'jdk11' | |
maven 'maven' | |
} | |
stages { | |
stage('checkout') { | |
steps { | |
// sh "mvn clean package -DskipTests=true" | |
// sh "ls -a" | |
git 'https://github.com/jenkins-docs/simple-java-maven-app.git' | |
} | |
} | |
stage('Build') { | |
steps { | |
sh "mvn clean package -DskipTests=true" | |
// sh "ls -a" | |
} | |
} | |
stage('Test') { | |
steps { | |
sh 'mvn test' | |
} | |
post { | |
always { | |
junit 'target/surefire-reports/*.xml' | |
} | |
} | |
} | |
stage('Deliver') { | |
steps { | |
sh './jenkins/scripts/deliver.sh' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment