-
Notifications
You must be signed in to change notification settings - Fork 168
/
Jenkinsfile
72 lines (72 loc) · 2.57 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
68
69
70
71
72
pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/develop']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '', url: 'https://github.com/signal18/replication-manager.git']]])
}
}
stage('Build OSC') {
when { buildingTag() }
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub') {
def Image = docker.build('signal18/replication-manager:2.3', '-f docker/Dockerfile .')
Image.push()
Image.push('latest')
Image.push(env.TAG_NAME)
}
}
}
}
stage('Build PRO') {
when { buildingTag() }
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub') {
def Image = docker.build('signal18/replication-manager:2.3-pro', '-f docker/Dockerfile.pro .')
Image.push()
Image.push(env.TAG_NAME+'-pro')
}
}
}
}
stage('Build nightly') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub') {
def Image = docker.build('signal18/replication-manager:2.3-pro', '-f docker/Dockerfile.pro .')
Image.push('nightly')
}
}
}
}
stage('Build DEV') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub') {
def Image = docker.build('signal18/replication-manager:2.3-dev', '-f docker/Dockerfile.dev .')
Image.push()
Image.push('dev')
Image.push(env.TAG_NAME+'-dev')
}
}
}
}
}
post {
failure {
script {
mattermostSend(
color: '#FF0000',
message: "Build failed! Job: `${JOB_NAME}` Build: `${BUILD_NUMBER}` (<${env.BUILD_URL}|Open>)"
)
}
}
success {
script {
sh 'docker system prune --force'
}
}
}
}