forked from linagora/esn-frontend-mailto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
46 lines (41 loc) · 902 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pipeline {
agent none
stages {
stage('Install packages & Lint & run tests') {
agent {
dockerfile {
filename 'Dockerfile'
dir 'test'
}
}
steps {
sh 'npm install -f'
sh 'npm run lint'
sh 'npm run test'
}
}
stage('Deliver Docker images') {
when { branch 'main' }
agent {
docker {
image 'docker:19.03.12-dind'
args '-e DOCKER_HOST=$DOCKER_HOST'
}
}
steps {
script {
def dockerImage = docker.build 'linagora/esn-frontend-mailto'
docker.withRegistry('', 'dockerHub') {
dockerImage.push('branch-main')
}
}
}
post {
success {
echo 'Build OpenPaas front Docker image'
build wait: false, job: 'openpaas-front/main'
}
}
}
}
}