forked from nzin/prometheus-cachethq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
41 lines (36 loc) · 864 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
def now = new Date()
env.DATE = now.format("yyyyMMdd_HHmmss")
pipeline {
agent any
stages {
stage('Checkout project...') {
steps {
checkout scm
}
}
stage('Define Version') {
steps {
script {
version = "1.0.1"
}
}
}
stage('Building...') {
steps {
ansiColor('xterm') {
sh 'docker build --no-cache .'
}
}
}
stage('Publishing Docker Image...') {
when {
expression {
env.BRANCH_NAME == 'master'
}
}
steps {
dockerBuilder "${env.WORKSPACE}", "prometheus-cachethq", version
}
}
}
}