forked from jglick/simple-maven-project-with-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
31 lines (21 loc) · 730 Bytes
/
Jenkinsfile
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
node('linux') {
// The Fetch Stage
stage 'Fetch'
// Get the code from my GitHub repository
git url: 'https://github.com/ovelindstrom/simple-maven-project-with-tests.git'
// Get the maven tool.
// ** NOTE: This 'M3' maven tool must be configured
// ** in the global configuration.
def mvnHome = tool 'M339'
env.PATH = "${mvnHome}/bin:${env.PATH}"
// Mark the code build 'stage'....
stage 'Build'
// Run the maven build
sh 'mvn clean install'
// Mark the code verify 'stage'....
stage 'Verify'
sh 'mvn -B verify'
// Mark the code deploy manual stage ....
stage 'Mess it up'
input id: 'DeployIt', message: 'Deploy it', ok: 'Hell Yah!'
}