FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

first jenkins script · chrishantha/sample-java-programs@6e8b5db · GitHub

Commit 6e8b5db

Browse files
authored
first jenkins script
1 parent 966cdb4 commit 6e8b5db

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 "Maven 3.6.3"
7+
}
8+
9+
stages {
10+
stage('Build') {
11+
steps {
12+
// Get some code from a GitHub repository
13+
git 'https://github.com/jglick/simple-maven-project-with-tests.git'
14+
15+
// Run Maven on a Unix agent.
16+
bat "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)

Back | FazBrowse Home | New Git URL