From 9291a4b4a5058fd416bf38249917111e1578b12f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 18 Feb 2021 21:51:18 +0100 Subject: [PATCH] use conditional build containers --- .drone.jsonnet | 32 ++++++++++++++++++++------------ .drone.yml | 13 ++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 6920f54..1833265 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -197,24 +197,32 @@ local PipelineBuildPackage = { }; local PipelineBuildContainer(arch='amd64') = { + local build = if arch == 'arm' then [{ + name: 'build', + image: 'python:3.9-alpine', + commands: [ + 'apk add -Uq --no-cache build-base libressl-dev libffi-dev musl-dev python3-dev git', + 'git fetch -tq', + 'pip install poetry poetry-dynamic-versioning -qq', + 'poetry build', + ], + }] else [{ + name: 'build', + image: 'python:3.9', + commands: [ + 'git fetch -tq', + 'pip install poetry poetry-dynamic-versioning -qq', + 'poetry build', + ], + }], + kind: 'pipeline', name: 'build-container-' + arch, platform: { os: 'linux', arch: arch, }, - steps: [ - { - name: 'build', - image: 'python:3.9-alpine', - commands: [ - 'apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git', - 'git fetch -tq', - 'pip install poetry poetry-dynamic-versioning -qq', - 'poetry config virtualenvs.create false', - 'poetry build', - ], - }, + steps: build + [ { name: 'dryrun', image: 'thegeeklab/drone-docker:19', diff --git a/.drone.yml b/.drone.yml index 2daa32d..ee3c769 100644 --- a/.drone.yml +++ b/.drone.yml @@ -225,12 +225,10 @@ platform: steps: - name: build - image: python:3.9-alpine + image: python:3.9 commands: - - apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq - - poetry config virtualenvs.create false - poetry build - name: dryrun @@ -305,12 +303,10 @@ platform: steps: - name: build - image: python:3.9-alpine + image: python:3.9 commands: - - apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq - - poetry config virtualenvs.create false - poetry build - name: dryrun @@ -387,10 +383,9 @@ steps: - name: build image: python:3.9-alpine commands: - - apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git + - apk add -Uq --no-cache build-base libressl-dev libffi-dev musl-dev python3-dev git - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq - - poetry config virtualenvs.create false - poetry build - name: dryrun @@ -637,6 +632,6 @@ depends_on: --- kind: signature -hmac: b6dde7da5760761e8d35affa9c641d0753fdb096a9e5a9af1e3d4e8fdaed25e7 +hmac: d8149a65a34ade3b69589171c8d17827b18cc7ee1a3a8d9ee0fef173861f3fe5 ...