Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drone: Fix docker buildx usage #471

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ steps:
DOCKER_USER:
from_secret: docker_user
IMAGE_NAME: grafana/grafana-image-renderer
image: google/cloud-sdk:412.0.0
image: google/cloud-sdk:449.0.0
name: publish_to_docker_master
volumes:
- name: docker
Expand Down Expand Up @@ -350,7 +350,7 @@ steps:
DOCKER_USER:
from_secret: docker_user
IMAGE_NAME: grafana/grafana-image-renderer
image: google/cloud-sdk:412.0.0
image: google/cloud-sdk:449.0.0
name: publish_to_docker
volumes:
- name: docker
Expand Down Expand Up @@ -414,6 +414,6 @@ kind: secret
name: srcclr_api_token
---
kind: signature
hmac: f130230eb86344632de732a9fa4fe1155c622537fbe3c61d9fc1d8b17a4cacea
hmac: eeb3dd651cc32e9e32188e7f904e97131911d9699c7610c4b33a19098c257d9f

...
5 changes: 5 additions & 0 deletions scripts/build_push_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ if [ -z "$(echo $TAG | grep -E "beta|master")" ]; then
tags+=("-t ${IMAGE_NAME}:latest")
fi

# The default Docker builder does not support multiple platforms, so this creates a non-default builder that does support multiple platforms.
if ! docker buildx inspect | grep -E 'Driver:\s+docker-container' >/dev/null; then
docker buildx create --use
fi

docker buildx build --platform linux/amd64,linux/arm64 --push ${tags[@]} .
2 changes: 1 addition & 1 deletion scripts/drone/promotion.star
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def publish_to_docker_release():
def publish_to_docker():
return {
'name': 'publish_to_docker',
'image': 'google/cloud-sdk:412.0.0',
'image': 'google/cloud-sdk:449.0.0',
'environment': {
'IMAGE_NAME': docker_image,
'DOCKER_USER': from_secret('docker_user'),
Expand Down
Loading