forked from feedhenry/nagios-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
executable file
·41 lines (34 loc) · 1.18 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
#!groovy
// https://github.com/feedhenry/fh-pipeline-library
@Library('fh-pipeline-library') _
stage('Trust') {
enforceTrustedApproval()
}
fhBuildNode(['label': 'openshift']) {
final String COMPONENT = "nagios4"
final String VERSION = "4.0.8"
final String BUILD = env.BUILD_NUMBER
final String DOCKER_HUB_ORG = "rhmap"
final String DOCKER_HUB_REPO = COMPONENT
final String CHANGE_URL = env.CHANGE_URL
stage('Platform Update') {
final Map updateParams = [
componentName: 'nagios',
componentVersion: VERSION,
componentBuild: BUILD,
changeUrl: CHANGE_URL
]
fhOpenshiftTemplatesComponentUpdate(updateParams)
fhCoreOpenshiftTemplatesComponentUpdate(updateParams)
}
stage('Build Image') {
final Map params = [
fromDir: '.',
buildConfigName: COMPONENT,
imageRepoSecret: "dockerhub",
outputImage: "docker.io/${DOCKER_HUB_ORG}/${DOCKER_HUB_REPO}:${VERSION}-${BUILD}"
]
buildWithDockerStrategy params
archiveArtifacts writeBuildInfo('nagios-container', "${VERSION}-${BUILD}")
}
}