mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-14 00:30:41 +00:00
use conditional build containers
This commit is contained in:
parent
60b78b0db2
commit
9291a4b4a5
@ -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',
|
||||
|
13
.drone.yml
13
.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
|
||||
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user