forked from gitlabhq/gitlab-shell
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Jenkinsfile
executable file
·40 lines (33 loc) · 1.14 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
#!groovy
// https://github.com/feedhenry/fh-pipeline-library
@Library('fh-pipeline-library') _
stage('Trust') {
enforceTrustedApproval()
}
fhBuildNode(['label': 'openshift']) {
final String COMPONENT = 'gitlab-shell'
final String VERSION = readFile("VERSION").trim()
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: COMPONENT,
componentVersion: VERSION,
componentBuild: BUILD,
changeUrl: CHANGE_URL
]
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(COMPONENT, "${VERSION}-${BUILD}")
}
}