forked from jenkinsci/pipeline-model-definition-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
39 lines (34 loc) · 1.29 KB
/
Jenkinsfile
File metadata and controls
39 lines (34 loc) · 1.29 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
// This Jenkinsfile's main purpose is to show a real-world-ish example
// of what Pipeline config syntax actually looks like.
pipeline {
// Make sure that the tools we need are installed and on the path.
tools {
maven "mvn"
jdk "jdk8"
}
// Run on executors with the "docker" label, because it's either that or Windows here.
agent label:"java"
// Make sure we have GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL set due to machine weirdness.
environment {
GIT_COMMITTER_NAME = "jenkins"
GIT_COMMITTER_EMAIL = "jenkins@jenkins.io"
}
// The order that sections are specified doesn't matter - this will still be run
// after the stages, even though it's specified before the stages.
post {
// No matter what the build status is, run these steps. There are other conditions
// available as well, such as "success", "failed", "unstable", and "changed".
always {
archive "*/target/**/*"
junit '*/target/surefire-reports/*.xml'
}
}
stages {
// While there's only one stage here, you can specify as many stages as you like!
stage("build") {
steps {
sh 'mvn clean install -Dmaven.test.failure.ignore=true'
}
}
}
}