Create Jenkinsfile

This commit is contained in:
PRIYANSH VAISHNAV 2024-05-21 12:57:53 +05:30 committed by GitHub
parent aa9b9e7f43
commit f5eea344bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

39
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,39 @@
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git 'https://github.com/spring-projects/spring-petclinic.git'
}
}
stage('Build') {
steps {
// Using Maven to build the project
sh './mvnw clean install'
}
}
stage('Test') {
steps {
// Run tests
sh './mvnw test'
}
}
stage('Package') {
steps {
// Package the application
sh './mvnw package'
}
}
}
post {
always {
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true
junit 'target/surefire-reports/*.xml'
}
}
}