test multi-platform

This commit is contained in:
Robert Kaussow 2021-06-16 22:36:19 +02:00
parent 3a23081931
commit 513d021b33
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 6 additions and 160 deletions

View File

@ -46,6 +46,7 @@ local PipelineBuildContainer(arch='amd64') = {
dockerfile: 'Dockerfile.' + std.split(arch, '_')[0], dockerfile: 'Dockerfile.' + std.split(arch, '_')[0],
platforms: [ platforms: [
'linux/' + std.strReplace(arch, '_', '/'), 'linux/' + std.strReplace(arch, '_', '/'),
'linux/arm64/v8',
], ],
repo: 'thegeeklab/${DRONE_REPO_NAME}', repo: 'thegeeklab/${DRONE_REPO_NAME}',
username: { from_secret: 'docker_username' }, username: { from_secret: 'docker_username' },
@ -191,7 +192,7 @@ local PipelineNotifications = {
[ [
PipelineTest, PipelineTest,
PipelineBuildContainer(arch='amd64'), PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64_v8'), // PipelineBuildContainer(arch='arm64_v8'),
PipelineBuildContainer(arch='arm_v7'), // PipelineBuildContainer(arch='arm_v7'),
PipelineNotifications, PipelineNotifications,
] ]

View File

@ -45,83 +45,6 @@ steps:
from_secret: docker_password from_secret: docker_password
platforms: platforms:
- linux/amd64 - linux/amd64
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- tags
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.amd64
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
- name: publish-quay
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.amd64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm64
platform:
os: linux
arch: amd64
steps:
- name: tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_SUFFIX: arm64
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
- name: dryrun
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.arm64
dry_run: true
password:
from_secret: docker_password
platforms:
- linux/arm64/v8 - linux/arm64/v8
repo: thegeeklab/${DRONE_REPO_NAME} repo: thegeeklab/${DRONE_REPO_NAME}
username: username:
@ -135,7 +58,7 @@ steps:
- name: publish-dockerhub - name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:latest image: thegeeklab/drone-docker-buildx:latest
settings: settings:
dockerfile: Dockerfile.arm64 dockerfile: Dockerfile.amd64
password: password:
from_secret: docker_password from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME} repo: thegeeklab/${DRONE_REPO_NAME}
@ -151,85 +74,7 @@ steps:
- name: publish-quay - name: publish-quay
image: thegeeklab/drone-docker-buildx:latest image: thegeeklab/drone-docker-buildx:latest
settings: settings:
dockerfile: Dockerfile.arm64 dockerfile: Dockerfile.amd64
password:
from_secret: quay_password
registry: quay.io
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: quay_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
---
kind: pipeline
name: build-container-arm
platform:
os: linux
arch: amd64
steps:
- name: tags
image: thegeeklab/docker-autotag
environment:
DOCKER_AUTOTAG_FORCE_LATEST: True
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
DOCKER_AUTOTAG_SUFFIX: arm
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
- name: dryrun
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.arm
dry_run: true
password:
from_secret: docker_password
platforms:
- linux/arm/v7
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- tags
- name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.arm
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/heads/main
- refs/tags/**
depends_on:
- tags
- name: publish-quay
image: thegeeklab/drone-docker-buildx:latest
settings:
dockerfile: Dockerfile.arm
password: password:
from_secret: quay_password from_secret: quay_password
registry: quay.io registry: quay.io
@ -346,6 +191,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: e5b344f9ad6e889213d7bb38319162636ec8028773f8a19a81c5cff41013d36a hmac: b17beada4b0766de7c3123eb41e1a2559dd2ea6addd635ef1361666088272300
... ...