-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
38 lines (35 loc) · 808 Bytes
/
Jenkinsfile
File metadata and controls
38 lines (35 loc) · 808 Bytes
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
#!/usr/bin/env groovy
// Copyright 2019, Development Gateway, see COPYING
pipeline {
agent any
environment {
APP_NAME = 'opensmtpd'
VENDOR = 'devgateway'
}
stages {
stage('Build') {
steps {
script {
env.TAG = env.BRANCH_NAME == 'master' ? 'latest' : env.BRANCH_NAME
docker.withRegistry('', 'dockerhub-ssemenukha') {
docker.build("$VENDOR/$APP_NAME").push(env.TAG)
}
}
}
} // Build
} // stages
post {
success {
script {
def msg = sh(
returnStdout: true,
script: 'git log --oneline --format=%B -n 1 HEAD | head -n 1'
)
slackSend(
message: "Built <$BUILD_URL|$JOB_NAME $BUILD_NUMBER>: $msg",
color: "good"
)
}
}
}
}