forked from eclipse-arrowhead/core-java-spring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
67 lines (62 loc) · 1.33 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pipeline
{
agent none
environment
{
DOCKER_REPO_URL = "${env.DOCKER_REPO}"
NAMESPACE = "${env.DOCKER_BUILD_NAMESPACE}"
DOCKER_USER = "${env.DOCKER_USER}"
DOCKER_USER_NAMESPACE = "${env.DOCKER_USER_NAMESPACE}"
DOCKER_PASS = credentials('portus-push-password')
}
stages
{
stage( "Create Maven Cache" )
{
agent{ label "master" }
steps
{
sh " docker volume create maven-repo "
}
}
stage( "Test" )
{
agent { label "master" }
steps
{
sh '''
./jenkins/copy/copy.sh
#./jenkins/test/maven.sh mvn test
'''
}
}
stage( "Build" )
{
agent { label "master" }
steps
{
sh '''
./jenkins/copy/copy.sh
./jenkins/build/maven.sh mvn -B -DskipTests clean package
./jenkins/build/build.sh
'''
}
}
stage( "Push" )
{
agent { label "master" }
steps
{
sh './jenkins/push/push.sh'
}
}
stage( "Deploy" )
{
agent { label "master" }
steps
{
sh 'echo Deploy'
}
}
}
}