Skip to content

Commit

Permalink
Merge pull request sclorg#22 from mikenairn/RHMAP-17757_add_component…
Browse files Browse the repository at this point in the history
…_update_stage_master

RHMAP-17757 - Add Platform Update stage to Jenkinsfile
  • Loading branch information
mikenairn authored Oct 9, 2017
2 parents 5270fe8 + 9d8398b commit f31a188
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,35 @@
// https://github.com/feedhenry/fh-pipeline-library
@Library('fh-pipeline-library') _

final String COMPONENT = 'mongodb'
final String VERSION = '3.2'
final String DOCKER_HUB_ORG = "rhmap"
final String DOCKER_HUB_REPO = COMPONENT

fhBuildNode(['label': 'openshift']) {

final String COMPONENT = 'mongodb'
final String VERSION = '3.2'
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: "centos-${VERSION}",
componentBuild: BUILD,
changeUrl: CHANGE_URL
]
fhOpenshiftTemplatesComponentUpdate(updateParams)
fhCoreOpenshiftTemplatesComponentUpdate(updateParams)
}

stage('Build Image') {
dockerBinaryBuild(COMPONENT, "centos-${VERSION}", DOCKER_HUB_ORG, DOCKER_HUB_REPO, 'dockerhubjenkins', "./${VERSION}")
final Map params = [
fromDir: "./${VERSION}",
buildConfigName: COMPONENT,
imageRepoSecret: "dockerhub",
outputImage: "docker.io/${DOCKER_HUB_ORG}/${DOCKER_HUB_REPO}:centos-${VERSION}-${BUILD}"
]
buildWithDockerStrategy params
archiveArtifacts writeBuildInfo('mongodb', "centos-${VERSION}-${BUILD}", false)
}

}

0 comments on commit f31a188

Please sign in to comment.