-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
52 lines (52 loc) · 1.23 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
pipeline {
agent any
triggers {
githubPush()
pollSCM('H H * * *')
}
environment {
MAIL_RECIPIENTS = '[email protected]'
}
options {
skipStagesAfterUnstable()
timestamps()
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Debian build and deploy') {
steps {
build job: 'build-package-no-arch', parameters: [
string(name: 'PACKAGE', value: "${JOB_NAME}"),
]
}
}
stage('Docker build') {
steps {
sh "docker build --no-cache -t wazoplatform/${JOB_NAME}:latest ."
}
}
stage('Docker publish') {
steps {
sh "docker push wazoplatform/${JOB_NAME}:latest"
}
}
stage('Docker build DB') {
steps {
sh "docker build -t wazoplatform/${JOB_NAME}-db:latest -f contribs/docker/Dockerfile-db ."
}
}
stage('Docker publish DB') {
steps {
sh "docker push wazoplatform/${JOB_NAME}-db:latest"
}
}
}
post {
failure {
emailext to: "${MAIL_RECIPIENTS}", subject: '${DEFAULT_SUBJECT}', body: '${DEFAULT_CONTENT}'
}
fixed {
emailext to: "${MAIL_RECIPIENTS}", subject: '${DEFAULT_SUBJECT}', body: '${DEFAULT_CONTENT}'
}
}
}