-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
40 lines (40 loc) · 1 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
pipeline {
agent any
tools {
jdk 'jdk_11'
}
stages {
stage('Compile') {
steps {
sh 'mvn clean install -Dmaven.javadoc.skip=true -DskipTests'
}
}
stage('Test') {
steps {
sh 'docker pull linagora/tmail-backend:memory-branch-master'
sh 'mvn -B surefire:test -T1C'
}
post {
always {
deleteDir() /* clean up our workspace */
}
}
}
stage('Deliver Docker image') {
when {
anyOf {
branch 'main'
buildingTag()
}
}
steps {
script {
def lscImage = docker.image "linagora/tmail-lsc:latest"
docker.withRegistry('', 'dockerHub') {
lscImage.push()
}
}
}
}
}
}