Skip to content

Commit c2dbd0b

Browse files
author
John Fitzpatrick
committed
Add Jenkinsfile.
1 parent 6acfed4 commit c2dbd0b

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Jenkinsfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
pipeline {
2+
agent any
3+
4+
tools {
5+
// Install the Maven version configured as "M3" and add it to the path.
6+
maven "M3"
7+
}
8+
9+
stages {
10+
stage('Build') {
11+
steps {
12+
// Get some code from a GitHub repository
13+
git 'https://github.com/apache/commons-cli.git'
14+
15+
// Run Maven on a Unix agent.
16+
sh "mvn -Dmaven.test.failure.ignore=true clean package"
17+
18+
// To run Maven on a Windows agent, use
19+
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
20+
}
21+
22+
post {
23+
// If Maven was able to run the tests, even if some of the test
24+
// failed, record the test results and archive the jar file.
25+
success {
26+
junit '**/target/surefire-reports/TEST-*.xml'
27+
archiveArtifacts 'target/*.jar'
28+
}
29+
}
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)