From 82a4ee52da4b3039c4adb5e768e8f0634986dd6b Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Tue, 12 Jan 2021 12:27:48 -0500 Subject: [PATCH] Use latest commit of ansible-builder Until we get to a point where ansible-builder is a little more stable, lets consume the latest commits. To help better test ansible-builder. Signed-off-by: Paul Belanger --- Containerfile | 19 +++++++++---------- requirements.txt | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Containerfile b/Containerfile index 2a909af..4292d3d 100644 --- a/Containerfile +++ b/Containerfile @@ -1,23 +1,22 @@ -FROM quay.io/ansible/ansible-runner:devel as galaxy +ARG ANSIBLE_RUNNER_IMAGE=quay.io/ansible/ansible-runner:devel +ARG PYTHON_BUILDER_IMAGE=quay.io/ansible/python-builder:latest +FROM $ANSIBLE_RUNNER_IMAGE as galaxy + +ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS= ADD _build/requirements.yml /build/_build/requirements.yml RUN ansible-galaxy role install -r /build/_build/requirements.yml --roles-path /usr/share/ansible/roles -RUN ansible-galaxy collection install -r /build/_build/requirements.yml --collections-path /usr/share/ansible/collections - -RUN mkdir -p /usr/share/ansible/roles /usr/share/ansible/collections - -FROM quay.io/ansible/python-builder:latest as builder +RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r /build/_build/requirements.yml --collections-path /usr/share/ansible/collections +FROM $PYTHON_BUILDER_IMAGE as builder ADD _build/requirements_combined.txt /tmp/src/requirements.txt ADD _build/bindep_combined.txt /tmp/src/bindep.txt RUN assemble -FROM quay.io/ansible/ansible-runner:devel - +FROM $ANSIBLE_RUNNER_IMAGE -COPY --from=galaxy /usr/share/ansible/roles /usr/share/ansible/roles -COPY --from=galaxy /usr/share/ansible/collections /usr/share/ansible/collections +COPY --from=galaxy /usr/share/ansible /usr/share/ansible COPY --from=builder /output/ /output/ RUN /output/install-from-bindep && rm -rf /output/wheels diff --git a/requirements.txt b/requirements.txt index 02dd405..f9e5cd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -ansible-builder +git+https://github.com/ansible/ansible-builder.git@devel#egg=ansible-builder