test buildx multiarch support #13

Merged
xoxys merged 10 commits from buildx into main 2021-01-09 23:47:29 +00:00

View File

@ -27,21 +27,26 @@ platform:
arch: amd64 arch: amd64
steps: steps:
- name: dryrun - name: wait-for
image: plugins/docker:19 image: thegeeklab/wait-for
settings: commands:
dockerfile: Dockerfile - wait-for dind:2376
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
environment: environment:
DOCKER_BUILDKIT: 1 WAITFOR_TIMEOUT: 60
- name: dryrun
image: jdrouet/docker-with-buildx:stable
commands:
- docker buildx create --use
- docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/buildx-alpine:latest .
volumes:
- name: dockersock
path: /var/run
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
depends_on:
- wait-for
- name: tags - name: tags
image: thegeeklab/docker-autotag image: thegeeklab/docker-autotag
@ -54,35 +59,23 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on:
- wait-for
- name: publish-dockerhub - name: publish-dockerhub
image: plugins/docker:19 image: jdrouet/docker-with-buildx:stable
settings: commands:
dockerfile: Dockerfile - docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD"
password: - docker buildx create --use
from_secret: docker_password - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag thegeeklab/buildx-alpine:latest .
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
environment: environment:
DOCKER_BUILDKIT: 1 DOCKER_PASSWORD:
when: from_secret: docker_password
ref: DOCKER_USERNAME:
- refs/heads/main from_secret: docker_username
- refs/tags/** volumes:
depends_on: - name: dockersock
- tags path: /var/run
- name: publish-quay
image: plugins/docker:19
settings:
dockerfile: Dockerfile
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when: when:
ref: ref:
- refs/heads/main - refs/heads/main
@ -104,7 +97,18 @@ steps:
- refs/tags/** - refs/tags/**
depends_on: depends_on:
- publish-dockerhub - publish-dockerhub
- publish-quay
services:
- name: dind
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}
trigger: trigger:
ref: ref:
@ -181,6 +185,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 14eb650adf452610ccb668009fadc51bbd44f9cede6a037ae2c4430c72458b5e hmac: fbe5a3e4d5b43aa5074eb9b614cab44043517e5747288eadf7621db6650da6de
... ...