mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-24 22:00:40 +00:00
ci: optimize build process and dependencies (#84)
This commit is contained in:
parent
d57fe8df42
commit
aeaa1dc8e1
@ -6,6 +6,7 @@ local PythonVersion(pyversion='3.6') = {
|
||||
},
|
||||
commands: [
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry config experimental.new-installer false',
|
||||
'poetry install -E ansible-base',
|
||||
'poetry run pytest',
|
||||
'poetry version',
|
||||
@ -33,6 +34,7 @@ local PipelineLint = {
|
||||
commands: [
|
||||
'git fetch -tq',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry config experimental.new-installer false',
|
||||
'poetry install',
|
||||
'poetry run yapf -dr ./ansiblelater',
|
||||
],
|
||||
@ -196,24 +198,35 @@ 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 cargo',
|
||||
'git fetch -tq',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry build',
|
||||
],
|
||||
environment: {
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true,
|
||||
},
|
||||
}] 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 libffi-dev musl-dev libressl-dev python3-dev cargo git',
|
||||
'git fetch -tq',
|
||||
'pip install --upgrade --no-cache-dir pip',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry build',
|
||||
],
|
||||
},
|
||||
steps: build + [
|
||||
{
|
||||
name: 'dryrun',
|
||||
image: 'thegeeklab/drone-docker:19',
|
||||
|
20
.drone.yml
20
.drone.yml
@ -12,6 +12,7 @@ steps:
|
||||
commands:
|
||||
- git fetch -tq
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry config experimental.new-installer false
|
||||
- poetry install
|
||||
- poetry run yapf -dr ./ansiblelater
|
||||
environment:
|
||||
@ -51,6 +52,7 @@ steps:
|
||||
image: python:3.6
|
||||
commands:
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry config experimental.new-installer false
|
||||
- poetry install -E ansible-base
|
||||
- poetry run pytest
|
||||
- poetry version
|
||||
@ -64,6 +66,7 @@ steps:
|
||||
image: python:3.7
|
||||
commands:
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry config experimental.new-installer false
|
||||
- poetry install -E ansible-base
|
||||
- poetry run pytest
|
||||
- poetry version
|
||||
@ -77,6 +80,7 @@ steps:
|
||||
image: python:3.8
|
||||
commands:
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry config experimental.new-installer false
|
||||
- poetry install -E ansible-base
|
||||
- poetry run pytest
|
||||
- poetry version
|
||||
@ -90,6 +94,7 @@ steps:
|
||||
image: python:3.9
|
||||
commands:
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry config experimental.new-installer false
|
||||
- poetry install -E ansible-base
|
||||
- poetry run pytest
|
||||
- poetry version
|
||||
@ -221,11 +226,9 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3.9-alpine
|
||||
image: python:3.9
|
||||
commands:
|
||||
- apk --update --quiet add build-base libffi-dev musl-dev libressl-dev python3-dev cargo git
|
||||
- git fetch -tq
|
||||
- pip install --upgrade --no-cache-dir pip
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
|
||||
@ -301,11 +304,9 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3.9-alpine
|
||||
image: python:3.9
|
||||
commands:
|
||||
- apk --update --quiet add build-base libffi-dev musl-dev libressl-dev python3-dev cargo git
|
||||
- git fetch -tq
|
||||
- pip install --upgrade --no-cache-dir pip
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
|
||||
@ -383,11 +384,12 @@ steps:
|
||||
- name: build
|
||||
image: python:3.9-alpine
|
||||
commands:
|
||||
- apk --update --quiet add build-base libffi-dev musl-dev libressl-dev python3-dev cargo git
|
||||
- apk add -Uq --no-cache build-base libressl-dev libffi-dev musl-dev python3-dev git cargo
|
||||
- git fetch -tq
|
||||
- pip install --upgrade --no-cache-dir pip
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
environment:
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
|
||||
- name: dryrun
|
||||
image: thegeeklab/drone-docker:19
|
||||
@ -633,6 +635,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: a3c1fab4fd9b55b5c90d443ade4979500139863a28e417e679ef9157909217ce
|
||||
hmac: b3355b546c9c55cb7c83d1a6b2ae59ec4177e6495b050bc8ecae62bb7a61eceb
|
||||
|
||||
...
|
||||
|
@ -8,6 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/thegeeklab/ansible-lat
|
||||
LABEL org.opencontainers.image.documentation="https://ansible-later.geekdocs.de/"
|
||||
|
||||
ENV PY_COLORS=1
|
||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
ADD dist/ansible_later-*.whl /
|
||||
|
||||
|
@ -8,6 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/thegeeklab/ansible-lat
|
||||
LABEL org.opencontainers.image.documentation="https://ansible-later.geekdocs.de/"
|
||||
|
||||
ENV PY_COLORS=1
|
||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
ADD dist/ansible_later-*.whl /
|
||||
|
||||
|
@ -8,6 +8,7 @@ LABEL org.opencontainers.image.source="https://github.com/thegeeklab/ansible-lat
|
||||
LABEL org.opencontainers.image.documentation="https://ansible-later.geekdocs.de/"
|
||||
|
||||
ENV PY_COLORS=1
|
||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
ADD dist/ansible_later-*.whl /
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user