Jenkinsfile_DP

This commit is contained in:
vishnu1411 2023-12-16 11:23:25 -05:00
parent 24dbc1fe80
commit 463eb5e655

42
Jenkinsfile vendored
View file

@ -1,15 +1,43 @@
node {
stage('sourcecode'){
//build step
// node {
// stage('sourcecode'){
// //build step
// git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
// }
// stage('Build and install'){
// //building using maven and install
// sh 'mvn clean install'
// }
// stage('Archive test results'){
// //insteall & archive test reuslts
// junit '**/surefire-reports/*xml'
// archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
// }
// }
pipeline{
agents any
stages {
stage ('SourceCode') {
steps {
//source code from github
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
}
stage('Build and install'){
//building using maven and install
}
stage ('Build and install') {
steps {
//clean and build using maven
sh 'mvn clean install'
}
stage('Archive test results'){
//insteall & archive test reuslts
}
stage ('Archive test results') {
steps {
//Archive the test results
junit '**/surefire-reports/*xml'
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
}
}
}
}