forked from javaparser/javaparser-maven-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
29 lines (22 loc) · 809 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
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "M3"
}
stages {
stage('Build') {
steps {
// Get some code from a GitHub repository
//git 'https://github.com/jglick/simple-maven-project-with-tests.git'
// Run Maven on a Unix agent.
bat "mvn clean package"
// To run Maven on a Windows agent, use
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
bat "java -jar target/javaparser-maven-sample-1.0-SNAPSHOT-shaded.jar"
bat "docker build -t java_sample ."
bat "docker run java_sample"
}
}
}
}