test buildx #32

Closed
xoxys wants to merge 5 commits from test into main
2 changed files with 15 additions and 172 deletions

View File

@ -40,12 +40,13 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'dryrun', name: 'dryrun',
image: 'thegeeklab/drone-docker-buildx:20', image: 'thegeeklab/drone-docker-buildx:latest',
settings: { settings: {
dry_run: true, // dry_run: true,
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' },
@ -58,7 +59,7 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'publish-dockerhub', name: 'publish-dockerhub',
image: 'thegeeklab/drone-docker-buildx:20', image: 'thegeeklab/drone-docker-buildx:latest',
settings: { settings: {
dockerfile: 'Dockerfile.' + std.split(arch, '_')[0], dockerfile: 'Dockerfile.' + std.split(arch, '_')[0],
repo: 'thegeeklab/${DRONE_REPO_NAME}', repo: 'thegeeklab/${DRONE_REPO_NAME}',
@ -72,7 +73,7 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
{ {
name: 'publish-quay', name: 'publish-quay',
image: 'thegeeklab/drone-docker-buildx:20', image: 'thegeeklab/drone-docker-buildx:latest',
settings: { settings: {
dockerfile: 'Dockerfile.' + std.split(arch, '_')[0], dockerfile: 'Dockerfile.' + std.split(arch, '_')[0],
registry: 'quay.io', registry: 'quay.io',
@ -179,8 +180,8 @@ local PipelineNotifications = {
], ],
depends_on: [ depends_on: [
'build-container-amd64', 'build-container-amd64',
'build-container-arm64', // 'build-container-arm64',
'build-container-arm', // 'build-container-arm',
], ],
trigger: { trigger: {
ref: ['refs/heads/main', 'refs/tags/**'], ref: ['refs/heads/main', 'refs/tags/**'],
@ -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

@ -37,91 +37,13 @@ steps:
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG} DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
- name: dryrun - name: dryrun
image: thegeeklab/drone-docker-buildx:20 image: thegeeklab/drone-docker-buildx:latest
settings: settings:
dockerfile: Dockerfile.amd64 dockerfile: Dockerfile.amd64
dry_run: true
password: password:
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:20
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:20
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:20
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:
@ -133,9 +55,9 @@ steps:
- tags - tags
- name: publish-dockerhub - name: publish-dockerhub
image: thegeeklab/drone-docker-buildx:20 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}
@ -149,87 +71,9 @@ steps:
- tags - tags
- name: publish-quay - name: publish-quay
image: thegeeklab/drone-docker-buildx:20 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:20
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:20
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:20
settings:
dockerfile: Dockerfile.arm
password: password:
from_secret: quay_password from_secret: quay_password
registry: quay.io registry: quay.io
@ -341,11 +185,9 @@ trigger:
depends_on: depends_on:
- build-container-amd64 - build-container-amd64
- build-container-arm64
- build-container-arm
--- ---
kind: signature kind: signature
hmac: 79016d019c45a35db1b95f25003ff0917115033684498ccb9ebf80d345051cc2 hmac: c59ef53ec9581723001db04888c122305cbf4552f4b7ec3fb05eb1184dd93992
... ...