Skip to content

Commit

Permalink
publish image to azure acr in addition to dockerhub (#217)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
  • Loading branch information
joshuafernandes authored Nov 26, 2019
1 parent beb9d0b commit 9562c71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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
Expand Down

0 comments on commit 9562c71

Please sign in to comment.