Skip to content

Commit

Permalink
Mirror the Docker build to quay.io
Browse files Browse the repository at this point in the history
  • Loading branch information
immanuelfodor committed Jun 22, 2021
1 parent fbbfb02 commit 8f3b83e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ steps:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKERHUB_PASSWORD:
from_secret: dockerhub_kubekarp_access_token
QUAY_PASSWORD:
from_secret: quay_kubekarp_encrypted_pass
HARBOR_FQDN:
from_secret: harbor_registry_fqdn
HARBOR_REPO:
Expand All @@ -53,6 +55,7 @@ steps:
|| true
)
- docker login --username immanuelfodor --password "$DOCKERHUB_PASSWORD"
- docker login --username immanuelfodor --password "$QUAY_PASSWORD" quay.io
- docker login $HARBOR_FQDN --username "$HARBOR_USERNAME" --password "$HARBOR_PASSWORD"
- docker buildx create --use
- |
Expand All @@ -61,6 +64,7 @@ steps:
--tag $HARBOR_REPO:${DRONE_COMMIT_SHA:0:10}-${DRONE_BUILD_NUMBER} \
--tag $HARBOR_REPO:master \
--tag immanuelfodor/kube-karp:master \
--tag quay.io/immanuelfodor/kube-karp:master \
--push \
.
Expand Down Expand Up @@ -134,6 +138,8 @@ steps:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKERHUB_PASSWORD:
from_secret: dockerhub_kubekarp_access_token
QUAY_PASSWORD:
from_secret: quay_kubekarp_encrypted_pass
commands:
- |
(
Expand All @@ -145,13 +151,17 @@ steps:
|| true
)
- docker login --username immanuelfodor --password "$DOCKERHUB_PASSWORD"
- docker login --username immanuelfodor --password "$QUAY_PASSWORD" quay.io
- docker buildx create --use
- |
docker buildx build \
--platform linux/arm,linux/arm64,linux/amd64 \
--tag immanuelfodor/kube-karp:$DRONE_TAG \
--tag immanuelfodor/kube-karp:$(echo "${DRONE_TAG}" | cut -d'.' -f 1-2) \
--tag immanuelfodor/kube-karp:$(echo "${DRONE_TAG}" | cut -d'.' -f 1) \
--tag quay.io/immanuelfodor/kube-karp:$DRONE_TAG \
--tag quay.io/immanuelfodor/kube-karp:$(echo "${DRONE_TAG}" | cut -d'.' -f 1-2) \
--tag quay.io/immanuelfodor/kube-karp:$(echo "${DRONE_TAG}" | cut -d'.' -f 1) \
--push \
.
Expand Down

0 comments on commit 8f3b83e

Please sign in to comment.