jenkins build pipeline

This commit is contained in:
n 2023-03-05 22:45:58 +05:30
parent f2d9c9b63f
commit e3d675af60

22
jenkins-pipeline Normal file
View file

@ -0,0 +1,22 @@
pipeliene {
agent { label 'MAVEN_JDK17' }
stages {
stage( 'version control sysytem') {
steps {
git url: 'https://github.com/spring-projects/spring-petclinic.git',
branch: 'main'
}
}
stage( 'package' ) {
steps {
sh: 'export PATH="/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH" && ./gradlew build',
}
}
stage( 'post build' ) {
steps {
archiveArtifacts artifacts: '**/libs/spring-petclinic-3.0.0/jar'
onlyIfSuccesful: true
junit testresults: '**/test-results/test/TEST-*.xml'
}
}
}