mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-14 16:50:40 +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 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',
|
kind: 'pipeline',
|
||||||
name: 'build-container-' + arch,
|
name: 'build-container-' + arch,
|
||||||
platform: {
|
platform: {
|
||||||
os: 'linux',
|
os: 'linux',
|
||||||
arch: arch,
|
arch: arch,
|
||||||
},
|
},
|
||||||
steps: [
|
steps: build + [
|
||||||
{
|
|
||||||
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',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'dryrun',
|
name: 'dryrun',
|
||||||
image: 'thegeeklab/drone-docker:19',
|
image: 'thegeeklab/drone-docker:19',
|
||||||
|
13
.drone.yml
13
.drone.yml
@ -225,12 +225,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: python:3.9-alpine
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git
|
|
||||||
- git fetch -tq
|
- git fetch -tq
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
- poetry build
|
- poetry build
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
@ -305,12 +303,10 @@ platform:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: python:3.9-alpine
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
- apk --update --quiet add build-base libressl-dev libffi-dev musl-dev python3-dev py3-cryptography git
|
|
||||||
- git fetch -tq
|
- git fetch -tq
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
- poetry build
|
- poetry build
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
@ -387,10 +383,9 @@ steps:
|
|||||||
- name: build
|
- name: build
|
||||||
image: python:3.9-alpine
|
image: python:3.9-alpine
|
||||||
commands:
|
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
|
- git fetch -tq
|
||||||
- pip install poetry poetry-dynamic-versioning -qq
|
- pip install poetry poetry-dynamic-versioning -qq
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
- poetry build
|
- poetry build
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
@ -637,6 +632,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: b6dde7da5760761e8d35affa9c641d0753fdb096a9e5a9af1e3d4e8fdaed25e7
|
hmac: d8149a65a34ade3b69589171c8d17827b18cc7ee1a3a8d9ee0fef173861f3fe5
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user