enable arm builds

This commit is contained in:
Robert Kaussow 2021-01-17 13:18:23 +01:00
parent ad5c252b8a
commit 3c3fe685e7
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 90 additions and 1 deletions

View File

@ -306,6 +306,7 @@ local PipelineNotifications = {
'build-binaries', 'build-binaries',
'build-container-amd64', 'build-container-amd64',
'build-container-arm64', 'build-container-arm64',
'build-container-arm',
], ],
trigger: { trigger: {
ref: ['refs/heads/main', 'refs/tags/**'], ref: ['refs/heads/main', 'refs/tags/**'],
@ -318,5 +319,6 @@ local PipelineNotifications = {
PipelineBuildBinaries, PipelineBuildBinaries,
PipelineBuildContainer(arch='amd64'), PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64'), PipelineBuildContainer(arch='arm64'),
PipelineBuildContainer(arch='arm'),
PipelineNotifications, PipelineNotifications,
] ]

View File

@ -284,6 +284,92 @@ trigger:
depends_on: depends_on:
- test - test
---
kind: pipeline
name: build-container-arm
platform:
os: linux
arch: arm
steps:
- name: build
image: golang:1.15
commands:
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-docker ./cmd/drone-docker
- name: dryrun
image: plugins/docker:19
settings:
config:
from_secret: docker_config
dockerfile: docker/Dockerfile.arm
dry_run: true
password:
from_secret: docker_password
repo: thegeeklab/${DRONE_REPO_NAME}
username:
from_secret: docker_username
when:
ref:
- refs/pull/**
depends_on:
- build
- name: publish-dockerhub
image: plugins/docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
config:
from_secret: docker_config
dockerfile: docker/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:
- dryrun
- name: publish-quay
image: plugins/docker:19
settings:
auto_tag: true
auto_tag_suffix: arm
config:
from_secret: docker_config
dockerfile: docker/Dockerfile.arm
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:
- dryrun
image_pull_secrets:
- docker_config
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- test
--- ---
kind: pipeline kind: pipeline
name: notifications name: notifications
@ -378,9 +464,10 @@ depends_on:
- build-binaries - build-binaries
- build-container-amd64 - build-container-amd64
- build-container-arm64 - build-container-arm64
- build-container-arm
--- ---
kind: signature kind: signature
hmac: 1a37c9d3891efb7387c814f247712b53573e6b5f0c830b8f1eda92a29ccd310c hmac: 1f404e18b6240f430bcac2ed960b876d4fe9cccaa896ad2c009db385ed9dbeb1
... ...