Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Add docker image tag push
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Yushkevich <[email protected]>
  • Loading branch information
neewy committed Nov 27, 2018
1 parent 2849c13 commit 2fa19c1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .jenkinsci/release-build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@ def doReleaseBuild() {
}
}
}
else if (GIT_LOCAL_BRANCH == 'shapshot-2849c1' && checkTag == 0) {
def tag = sh(script: 'git describe --tags --exact-match ${GIT_COMMIT}', returnStdout: true).trim().replaceAll('-','_')
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
iCRelease.push("${platform}-${tag}")
}
if (manifest.manifestSupportEnabled()) {
manifest.manifestCreate("${DOCKER_REGISTRY_BASENAME}:${tag}",
["${DOCKER_REGISTRY_BASENAME}:x86_64-${tag}"])
manifest.manifestAnnotate("${DOCKER_REGISTRY_BASENAME}:${tag}",
[
[manifest: "${DOCKER_REGISTRY_BASENAME}:x86_64-${tag}",
arch: 'amd64', os: 'linux', osfeatures: [], variant: '']
])
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'login', passwordVariable: 'password')]) {
manifest.manifestPush("${DOCKER_REGISTRY_BASENAME}:${tag}", login, password)
}
}
}
sh "docker rmi ${iCRelease.id}"
}
return this

0 comments on commit 2fa19c1

Please sign in to comment.