This commit is contained in:
vishnu1411 2023-12-16 13:02:21 -05:00 committed by GitHub
commit 047f4b924e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 74 additions and 0 deletions

31
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,31 @@
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
retry(2)
}
stages {
stage ('SourceCode') {
steps {
//source code from github
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
}
}
stage ('Build and install') {
steps {
//clean and build using maven
sh 'mvn clean install'
}
}
stage ('Archive test results') {
steps {
//Archive the test results
junit '**/surefire-reports/*xml'
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
}
}
}
}

43
scripted_jf_backup Normal file
View file

@ -0,0 +1,43 @@
// 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{
agent any
stages {
stage ('SourceCode') {
steps {
//source code from github
git branch: 'main', url: 'https://github.com/vishnu1411/spring-petclinic.git'
}
}
stage ('Build and install') {
steps {
//clean and build using maven
sh 'mvn clean install'
}
}
stage ('Archive test results') {
steps {
//Archive the test results
junit '**/surefire-reports/*xml'
archiveArtifacts artifacts: '**/*.jar', followSymlinks: false
}
}
}
}