Compare commits
No commits in common. "master" and "single-file" have entirely different histories.
master
...
single-fil
91
.drone.yml
91
.drone.yml
@ -1,6 +1,25 @@
|
||||
kind: pipeline
|
||||
name: tests
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
steps:
|
||||
- name: run tests
|
||||
image: ubuntu:bionic
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y make
|
||||
- make test
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: docker builds
|
||||
name: linux-amd64
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
trigger:
|
||||
event:
|
||||
@ -11,35 +30,69 @@ trigger:
|
||||
- refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: build amd64
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: iamthefij/multiarch-pipeline-test
|
||||
auto_tag: true
|
||||
auto_tag_suffix: drone-amd64
|
||||
auto_tag_suffix: linux-amd64
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
- name: build arm32v7
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: iamthefij/multiarch-pipeline-test
|
||||
auto_tag: true
|
||||
auto_tag_suffix: drone-arm
|
||||
auto_tag_suffix: linux-arm
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- ARCH=arm
|
||||
- REPO=arm32v7
|
||||
- name: build-arm64
|
||||
- REPO=arm32v6
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-arm64
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: iamthefij/multiarch-pipeline-test
|
||||
auto_tag: true
|
||||
auto_tag_suffix: drone-arm64
|
||||
auto_tag_suffix: linux-arm64
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
@ -47,13 +100,33 @@ steps:
|
||||
build_args:
|
||||
- ARCH=aarch64
|
||||
- REPO=arm64v8
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: manifest
|
||||
|
||||
depends_on:
|
||||
- linux-amd64
|
||||
- linux-arm
|
||||
- linux-arm64
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: publish manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
spec: drone-manifest.tmpl
|
||||
spec: manifest.tmpl
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
|
@ -4,17 +4,11 @@
|
||||
ARG REPO=library
|
||||
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static
|
||||
|
||||
# On some systems, touching a dummy file in the /usr/bin dir doesn't work
|
||||
# and instead removes all files previously in the directory. Not sure why
|
||||
# this is happening. Moving everything to a different directory seems to
|
||||
# work fine though.
|
||||
RUN mkdir /qemu && touch /qemu/qemu-x86_64-dummy && cp /usr/bin/qemu-* /qemu/
|
||||
|
||||
FROM ${REPO}/python:3-alpine
|
||||
|
||||
# This should be the target qemu arch
|
||||
ARG ARCH=x86_64
|
||||
COPY --from=qemu-user-static /qemu/qemu-${ARCH}-* /usr/bin/
|
||||
COPY --from=qemu-user-static /usr/bin/qemu-* /usr/bin/
|
||||
|
||||
# Everything below here is just a simple example
|
||||
|
||||
|
14
get_qemu.sh
Executable file
14
get_qemu.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
HOST_ARCH=x86_64
|
||||
VERSION=v2.9.1-1
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Multiple args can be passed in, but in most cases (Makefile and .drone.yml) we only use one at a time
|
||||
for target_arch in $*; do
|
||||
wget https://github.com/multiarch/qemu-user-static/releases/download/$VERSION/${HOST_ARCH}_qemu-${target_arch}-static.tar.gz
|
||||
tar -xvf ${HOST_ARCH}_qemu-${target_arch}-static.tar.gz
|
||||
rm ${HOST_ARCH}_qemu-${target_arch}-static.tar.gz
|
||||
done
|
@ -7,18 +7,18 @@ tags:
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-amd64
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-arm64
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
-
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-arm
|
||||
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
Loading…
Reference in New Issue
Block a user