test multi-platform
This commit is contained in:
parent
3a23081931
commit
513d021b33
@ -46,6 +46,7 @@ local PipelineBuildContainer(arch='amd64') = {
|
||||
dockerfile: 'Dockerfile.' + std.split(arch, '_')[0],
|
||||
platforms: [
|
||||
'linux/' + std.strReplace(arch, '_', '/'),
|
||||
'linux/arm64/v8',
|
||||
],
|
||||
repo: 'thegeeklab/${DRONE_REPO_NAME}',
|
||||
username: { from_secret: 'docker_username' },
|
||||
@ -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,
|
||||
]
|
||||
|
161
.drone.yml
161
.drone.yml
@ -45,83 +45,6 @@ steps:
|
||||
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: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
|
||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||
username:
|
||||
@ -135,7 +58,7 @@ steps:
|
||||
- name: publish-dockerhub
|
||||
image: thegeeklab/drone-docker-buildx:latest
|
||||
settings:
|
||||
dockerfile: Dockerfile.arm64
|
||||
dockerfile: Dockerfile.amd64
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||
@ -151,85 +74,7 @@ steps:
|
||||
- name: publish-quay
|
||||
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: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
|
||||
dockerfile: Dockerfile.amd64
|
||||
password:
|
||||
from_secret: quay_password
|
||||
registry: quay.io
|
||||
@ -346,6 +191,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: e5b344f9ad6e889213d7bb38319162636ec8028773f8a19a81c5cff41013d36a
|
||||
hmac: b17beada4b0766de7c3123eb41e1a2559dd2ea6addd635ef1361666088272300
|
||||
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user