Skip to content

Commit

Permalink
feat: support for multi-arch image amd64/arm64
Browse files Browse the repository at this point in the history
See also siderolabs/toolchain#11

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira authored and talos-bot committed Jul 20, 2020
1 parent 24243c5 commit 994665e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
25 changes: 11 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,18 @@ steps:
image: autonomy/build-container:latest
commands:
- git fetch --tags
- apk add coreutils
- echo -e "$BUILDX_KUBECONFIG" > /root/.kube/config
- docker buildx create --driver kubernetes --driver-opt replicas=2 --driver-opt namespace=ci --driver-opt image=moby/buildkit:v0.6.2 --name ci --buildkitd-flags="--allow-insecure-entitlement security.insecure" --use
- docker buildx inspect --bootstrap
- install-ci-key
- setup-buildx-amd64-arm64
environment:
BUILDX_KUBECONFIG:
from_secret: kubeconfig
privileged: true
SSH_KEY:
from_secret: ssh_key
volumes:
- name: docker-socket
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
- name: ssh
path: /root/.ssh

- name: build-pull-request
image: autonomy/build-container:latest
Expand All @@ -60,8 +57,8 @@ steps:
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
- name: ssh
path: /root/.ssh

- name: build-and-publish
image: autonomy/build-container:latest
Expand All @@ -83,15 +80,15 @@ steps:
path: /var/run
- name: docker
path: /root/.docker/buildx
- name: kube
path: /root/.kube
- name: ssh
path: /root/.ssh

volumes:
- name: docker-socket
temp: {}
- name: docker
temp: {}
- name: kube
- name: ssh
temp: {}
---
kind: pipeline
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
REGISTRY_AND_USERNAME := $(REGISTRY)/$(USERNAME)

BUILD := docker buildx build
PLATFORM ?= linux/amd64
PLATFORM ?= linux/amd64,linux/arm64
PROGRESS ?= auto
PUSH ?= false
COMMON_ARGS := --file=Pkgfile
Expand Down
4 changes: 2 additions & 2 deletions Pkgfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = docker.io/autonomy/bldr:v0.1.0-alpha.0-frontend
# syntax = docker.io/autonomy/bldr:v0.2.0-alpha.2-frontend

format: v1alpha2

vars:
TOOLCHAIN_IMAGE: docker.io/autonomy/toolchain:52e8abf
TOOLCHAIN_IMAGE: docker.io/autonomy/toolchain:v0.1.0-4-gaee36a0

0 comments on commit 994665e

Please sign in to comment.