From e3d675af60ddab19133bf5520b8b7b9d4cb38b06 Mon Sep 17 00:00:00 2001 From: n Date: Sun, 5 Mar 2023 22:45:58 +0530 Subject: [PATCH] jenkins build pipeline --- jenkins-pipeline | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 jenkins-pipeline diff --git a/jenkins-pipeline b/jenkins-pipeline new file mode 100644 index 000000000..522979856 --- /dev/null +++ b/jenkins-pipeline @@ -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' + } + } +} \ No newline at end of file