publish image to azure acr in addition to dockerhub (#217)

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
pull/218/head
Joshua Fernandes 5 years ago committed by GitHub
parent beb9d0bcf3
commit 9562c71db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .circleci/config.yml
  2. 2
      build.gradle

@ -183,7 +183,8 @@ jobs:
- run:
name: Publish Docker
command: |
docker login --username "${DOCKER_USER}" --password "${DOCKER_PASSWORD}"
docker login --username "${DOCKER_USER}" -password "${DOCKER_PASSWORD}"
docker login "${ACR_REPO}" -username "${ACR_DOCKER_USER}" -password "${ACR_DOCKER_PASSWORD}"
./gradlew --no-daemon --parallel "-Pbranch=${CIRCLE_BRANCH}" dockerUpload
workflows:

@ -568,6 +568,7 @@ task testDocker(type: Exec) {
task dockerUpload(type: Exec) {
dependsOn distDocker
def imageName = "hyperledger/besu"
def azureImageName = "hyperledger.azurecr.io/besu"
def image = project.hasProperty('release.releaseVersion') ? "${imageName}:" + project.property('release.releaseVersion') : "${imageName}:${project.version}"
def cmd = "docker push '${image}'"
def additionalTags = []
@ -583,6 +584,7 @@ task dockerUpload(type: Exec) {
additionalTags.each { tag ->
cmd += " && docker tag '${image}' '${imageName}:${tag.trim()}' && docker push '${imageName}:${tag.trim()}'"
cmd += " && docker tag '${image}' '${azureImageName}:${tag.trim()}' && docker push '${azureImageName}:${tag.trim()}'"
}
executable "sh"
args "-c", cmd

Loading…
Cancel
Save