test buildx plugin
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Robert Kaussow 2021-01-10 21:52:12 +01:00
parent cb3c28cf2c
commit 1e0fae2bc9
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
2 changed files with 51 additions and 39 deletions

View File

@ -39,18 +39,18 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'dryrun', name: 'dryrun',
image: 'jdrouet/docker-with-buildx:stable', image: 'thegeeklab/drone-docker-buildx',
commands: [ settings: {
'docker buildx create --use', config: { from_secret: 'docker_config' },
'docker buildx build --platform linux/' + std.strReplace(arch, '_', '/') + ' --tag thegeeklab/buildx-alpine:latest -f "$$DOCKERFILE" .', dry_run: true,
], dockerfile: 'docker/Dockerfile.' + std.split(arch, '_')[0],
environment: { platforms: [
DOCKERFILE: 'Dockerfile.' + std.split(arch, '_')[0], 'linux/' + std.strReplace(arch, '_', '/'),
],
repo: 'thegeeklab/buildx-alpine',
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
}, },
volumes: [{
name: 'dockersock-' + arch,
path: '/var/run',
}],
depends_on: ['wait-for'], depends_on: ['wait-for'],
when: { when: {
ref: ['refs/pull/**'], ref: ['refs/pull/**'],

View File

@ -35,15 +35,19 @@ steps:
WAITFOR_TIMEOUT: 60 WAITFOR_TIMEOUT: 60
- name: dryrun - name: dryrun
image: jdrouet/docker-with-buildx:stable image: thegeeklab/drone-docker-buildx
commands: settings:
- docker buildx create --use config:
- docker buildx build --platform linux/amd64 --tag thegeeklab/buildx-alpine:latest -f "$$DOCKERFILE" . from_secret: docker_config
environment: dockerfile: docker/Dockerfile.amd64
DOCKERFILE: Dockerfile.amd64 dry_run: true
volumes: password:
- name: dockersock-amd64 from_secret: docker_password
path: /var/run platforms:
- linux/amd64
repo: thegeeklab/buildx-alpine
username:
from_secret: docker_username
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
@ -124,15 +128,19 @@ steps:
WAITFOR_TIMEOUT: 60 WAITFOR_TIMEOUT: 60
- name: dryrun - name: dryrun
image: jdrouet/docker-with-buildx:stable image: thegeeklab/drone-docker-buildx
commands: settings:
- docker buildx create --use config:
- docker buildx build --platform linux/arm64/v8 --tag thegeeklab/buildx-alpine:latest -f "$$DOCKERFILE" . from_secret: docker_config
environment: dockerfile: docker/Dockerfile.arm64
DOCKERFILE: Dockerfile.arm64 dry_run: true
volumes: password:
- name: dockersock-arm64_v8 from_secret: docker_password
path: /var/run platforms:
- linux/arm64/v8
repo: thegeeklab/buildx-alpine
username:
from_secret: docker_username
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
@ -213,15 +221,19 @@ steps:
WAITFOR_TIMEOUT: 60 WAITFOR_TIMEOUT: 60
- name: dryrun - name: dryrun
image: jdrouet/docker-with-buildx:stable image: thegeeklab/drone-docker-buildx
commands: settings:
- docker buildx create --use config:
- docker buildx build --platform linux/arm/v7 --tag thegeeklab/buildx-alpine:latest -f "$$DOCKERFILE" . from_secret: docker_config
environment: dockerfile: docker/Dockerfile.arm
DOCKERFILE: Dockerfile.arm dry_run: true
volumes: password:
- name: dockersock-arm_v7 from_secret: docker_password
path: /var/run platforms:
- linux/arm/v7
repo: thegeeklab/buildx-alpine
username:
from_secret: docker_username
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
@ -358,6 +370,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 1529e330f44c46887ec7fb431cf29ee6e65dde07f81f1206166d0de540a06e67 hmac: 0d15eda6b01d23551b72f8e12348bb1028d19c0b30cf28be2f38e737a3f9a51d
... ...