forked from Hari25cs/SaiJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
40 lines (35 loc) · 1.01 KB
/
Jenkinsfile
File metadata and controls
40 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pipeline {
// agent { node "Slave1" } or agent any
agent any
tools { maven "maven3" }
// environment {
// Install the Maven version configured as "maven3.8" and add it to the path.
//
// another way of using maven given below.
// PATH="/opt/maven3/bin:$PATH"
//}
stages {
stage('CheckOut') {
steps {
// Get some code from a GitHub repository
git credentialsId: '70860dd4-6c55-45b4-a377-6107adaa15a7', url: 'git@github.com:paramv10/SaiJavaCode.git'
}
}
stage('Build') {
steps {
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean package"
// To run Maven on a Windows agent, use
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
}
post {
// If Maven was able to run the tests, even if some of the test
// failed, record the test results and archive the war file.
success {
junit '**/target/surefire-reports/TEST-*.xml'
archiveArtifacts 'webapp/target/*.war'
}
}
}
}
}