File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ pipeline {
2+ // agent { node "Slave1" } or agent any
3+ agent any
4+ environment {
5+ // Install the Maven version configured as "maven3.8" and add it to the path.
6+ // tool { maven "maven3"
7+ // another way of using maven given below.
8+
9+ PATH = " /opt/maven3/bin:$PATH "
10+ }
11+
12+ stages {
13+ stage(' CheckOut' ) {
14+ steps {
15+ // Get some code from a GitHub repository
16+ git branch : ' dev' , credentialsId : ' 70860dd4-6c55-45b4-a377-6107adaa15a7' , url : ' git@github.com:paramv10/taxi-booking.git'
17+ }
18+ }
19+ stage(' Build' ) {
20+ steps {
21+ // Run Maven on a Unix agent.
22+ sh " mvn -Dmaven.test.failure.ignore=true clean package"
23+ // To run Maven on a Windows agent, use
24+ // bat "mvn -Dmaven.test.failure.ignore=true clean package"
25+ }
26+ post {
27+ // If Maven was able to run the tests, even if some of the test
28+ // failed, record the test results and archive the war file.
29+ success {
30+ junit ' **/target/surefire-reports/TEST-*.xml'
31+ archiveArtifacts ' webapp/target/*.war'
32+ }
33+ }
34+ }
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments