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

View File

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