Skip to content

Commit

Permalink
remove release build withRegistry wrapper (hyperledger-iroha#1428)
Browse files Browse the repository at this point in the history
Signed-off-by: Artyom Bakhtin <[email protected]>
  • Loading branch information
bakhtin authored Jun 7, 2018
1 parent c56398b commit b4a9bda
Showing 1 changed file with 37 additions and 39 deletions.
76 changes: 37 additions & 39 deletions .jenkinsci/release-build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -56,47 +56,45 @@ def doReleaseBuild() {
sh "mv /tmp/${GIT_COMMIT}-${BUILD_NUMBER}/iroha.deb /tmp/${env.GIT_COMMIT}"
sh "chmod +x /tmp/${env.GIT_COMMIT}/entrypoint.sh"
iCRelease = docker.build("${DOCKER_REGISTRY_BASENAME}:${GIT_COMMIT}-${BUILD_NUMBER}-release", "--no-cache -f /tmp/${env.GIT_COMMIT}/Dockerfile /tmp/${env.GIT_COMMIT}")
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
if (env.GIT_LOCAL_BRANCH == 'develop') {
iCRelease.push("${platform}-develop")
if (manifest.manifestSupportEnabled()) {
manifest.manifestCreate("${DOCKER_REGISTRY_BASENAME}:develop",
["${DOCKER_REGISTRY_BASENAME}:x86_64-develop",
"${DOCKER_REGISTRY_BASENAME}:armv7l-develop",
"${DOCKER_REGISTRY_BASENAME}:aarch64-develop"])
manifest.manifestAnnotate("${DOCKER_REGISTRY_BASENAME}:develop",
[
[manifest: "${DOCKER_REGISTRY_BASENAME}:x86_64-develop",
arch: 'amd64', os: 'linux', osfeatures: [], variant: ''],
[manifest: "${DOCKER_REGISTRY_BASENAME}:armv7l-develop",
arch: 'arm', os: 'linux', osfeatures: [], variant: 'v7'],
[manifest: "${DOCKER_REGISTRY_BASENAME}:aarch64-develop",
arch: 'arm64', os: 'linux', osfeatures: [], variant: '']
])
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'login', passwordVariable: 'password')]) {
manifest.manifestPush("${DOCKER_REGISTRY_BASENAME}:develop", login, password)
}
if (env.GIT_LOCAL_BRANCH == 'develop') {
iCRelease.push("${platform}-develop")
if (manifest.manifestSupportEnabled()) {
manifest.manifestCreate("${DOCKER_REGISTRY_BASENAME}:develop",
["${DOCKER_REGISTRY_BASENAME}:x86_64-develop",
"${DOCKER_REGISTRY_BASENAME}:armv7l-develop",
"${DOCKER_REGISTRY_BASENAME}:aarch64-develop"])
manifest.manifestAnnotate("${DOCKER_REGISTRY_BASENAME}:develop",
[
[manifest: "${DOCKER_REGISTRY_BASENAME}:x86_64-develop",
arch: 'amd64', os: 'linux', osfeatures: [], variant: ''],
[manifest: "${DOCKER_REGISTRY_BASENAME}:armv7l-develop",
arch: 'arm', os: 'linux', osfeatures: [], variant: 'v7'],
[manifest: "${DOCKER_REGISTRY_BASENAME}:aarch64-develop",
arch: 'arm64', os: 'linux', osfeatures: [], variant: '']
])
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'login', passwordVariable: 'password')]) {
manifest.manifestPush("${DOCKER_REGISTRY_BASENAME}:develop", login, password)
}
}
else if (env.GIT_LOCAL_BRANCH == 'master') {
iCRelease.push("${platform}-latest")
if (manifest.manifestSupportEnabled()) {
manifest.manifestCreate("${DOCKER_REGISTRY_BASENAME}:latest",
["${DOCKER_REGISTRY_BASENAME}:x86_64-latest",
"${DOCKER_REGISTRY_BASENAME}:armv7l-latest",
"${DOCKER_REGISTRY_BASENAME}:aarch64-latest"])
manifest.manifestAnnotate("${DOCKER_REGISTRY_BASENAME}:latest",
[
[manifest: "${DOCKER_REGISTRY_BASENAME}:x86_64-latest",
arch: 'amd64', os: 'linux', osfeatures: [], variant: ''],
[manifest: "${DOCKER_REGISTRY_BASENAME}:armv7l-latest",
arch: 'arm', os: 'linux', osfeatures: [], variant: 'v7'],
[manifest: "${DOCKER_REGISTRY_BASENAME}:aarch64-latest",
arch: 'arm64', os: 'linux', osfeatures: [], variant: '']
])
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'login', passwordVariable: 'password')]) {
manifest.manifestPush("${DOCKER_REGISTRY_BASENAME}:latest", login, password)
}
}
else if (env.GIT_LOCAL_BRANCH == 'master') {
iCRelease.push("${platform}-latest")
if (manifest.manifestSupportEnabled()) {
manifest.manifestCreate("${DOCKER_REGISTRY_BASENAME}:latest",
["${DOCKER_REGISTRY_BASENAME}:x86_64-latest",
"${DOCKER_REGISTRY_BASENAME}:armv7l-latest",
"${DOCKER_REGISTRY_BASENAME}:aarch64-latest"])
manifest.manifestAnnotate("${DOCKER_REGISTRY_BASENAME}:latest",
[
[manifest: "${DOCKER_REGISTRY_BASENAME}:x86_64-latest",
arch: 'amd64', os: 'linux', osfeatures: [], variant: ''],
[manifest: "${DOCKER_REGISTRY_BASENAME}:armv7l-latest",
arch: 'arm', os: 'linux', osfeatures: [], variant: 'v7'],
[manifest: "${DOCKER_REGISTRY_BASENAME}:aarch64-latest",
arch: 'arm64', os: 'linux', osfeatures: [], variant: '']
])
withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'login', passwordVariable: 'password')]) {
manifest.manifestPush("${DOCKER_REGISTRY_BASENAME}:latest", login, password)
}
}
}
Expand Down

0 comments on commit b4a9bda

Please sign in to comment.