Compare commits

..

12 Commits

Author SHA1 Message Date
e27af3b995 Drone updates
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-12 18:52:44 -08:00
5268a8d467 Remove get_qemu 2020-02-12 18:42:34 -08:00
aed73fe158 Consolidate
All checks were successful
continuous-integration/drone/push Build is passing
2020-01-30 16:14:51 -08:00
efb29fc022 Try moving everything to a new dir
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 16:04:59 -08:00
079057ace5 Fix drone yaml 2020-01-30 16:04:59 -08:00
cba660bf03 More debug in bin dir 2020-01-30 16:01:51 -08:00
a35ae1081b no touchy
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:53:45 -08:00
7b99514459 Ok. Up a dir?
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:53:13 -08:00
a4104a5201 Very weird... How about before we touch a file?
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:51:26 -08:00
3594fd1de3 Let's see what's in that dir
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:48:52 -08:00
33e42659fc Touch dummy file in qemu image
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:46:05 -08:00
6ec3055815 Try to copy single qemu file
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-30 15:44:05 -08:00
4 changed files with 19 additions and 100 deletions

View File

@ -1,25 +1,6 @@
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 kind: pipeline
name: linux-amd64 name: docker builds
depends_on:
- tests
trigger: trigger:
event: event:
@ -30,69 +11,35 @@ trigger:
- refs/tags/v* - refs/tags/v*
steps: steps:
- name: build - name: build amd64
image: plugins/docker image: plugins/docker
settings: settings:
repo: iamthefij/multiarch-pipeline-test repo: iamthefij/multiarch-pipeline-test
auto_tag: true auto_tag: true
auto_tag_suffix: linux-amd64 auto_tag_suffix: drone-amd64
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_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 image: plugins/docker
settings: settings:
repo: iamthefij/multiarch-pipeline-test repo: iamthefij/multiarch-pipeline-test
auto_tag: true auto_tag: true
auto_tag_suffix: linux-arm auto_tag_suffix: drone-arm
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
build_args: build_args:
- ARCH=arm - ARCH=arm
- REPO=arm32v6 - REPO=arm32v7
- name: build-arm64
---
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 image: plugins/docker
settings: settings:
repo: iamthefij/multiarch-pipeline-test repo: iamthefij/multiarch-pipeline-test
auto_tag: true auto_tag: true
auto_tag_suffix: linux-arm64 auto_tag_suffix: drone-arm64
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
@ -100,33 +47,13 @@ steps:
build_args: build_args:
- ARCH=aarch64 - ARCH=aarch64
- REPO=arm64v8 - 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 - name: publish manifest
image: plugins/manifest image: plugins/manifest
settings: settings:
spec: manifest.tmpl spec: drone-manifest.tmpl
auto_tag: true auto_tag: true
ignore_missing: true ignore_missing: true
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password

View File

@ -4,11 +4,17 @@
ARG REPO=library ARG REPO=library
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static 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 FROM ${REPO}/python:3-alpine
# This should be the target qemu arch # This should be the target qemu arch
ARG ARCH=x86_64 ARG ARCH=x86_64
COPY --from=qemu-user-static /usr/bin/qemu-* /usr/bin/ COPY --from=qemu-user-static /qemu/qemu-${ARCH}-* /usr/bin/
# Everything below here is just a simple example # Everything below here is just a simple example

View File

@ -7,18 +7,18 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- -
image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}drone-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux

View File

@ -1,14 +0,0 @@
#! /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