From 1ce4093b1650101eb6a82926af360a215f961dbf Mon Sep 17 00:00:00 2001 From: lumarel Date: Thu, 12 Jan 2023 23:43:24 +0100 Subject: [PATCH 1/2] Update config for breaking change in Tox 4.0.6 --- tox.ini | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/tox.ini b/tox.ini index 589786a..880c084 100644 --- a/tox.ini +++ b/tox.ini @@ -8,59 +8,55 @@ install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt [testenv:podman] -passenv = - HOME -whitelist_external = - true +passenv = HOME +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} [testenv:docker] -passenv = - HOME DOCKER_BUILDKIT -whitelist_external = - true +passenv = HOME,DOCKER_BUILDKIT +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} --container-runtime=docker [testenv:podman-stable-2.11] -passenv = - HOME -whitelist_external = - true +passenv = HOME +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} --build-arg EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.11-latest [testenv:docker-stable-2.11] -passenv = - HOME DOCKER_BUILDKIT -whitelist_external = - true +passenv = HOME,DOCKER_BUILDKIT +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} --build-arg EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.11-latest --container-runtime=docker [testenv:podman-stable-2.12] -passenv = - HOME -whitelist_external = - true +passenv = HOME +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} --build-arg EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.12-latest [testenv:docker-stable-2.12] -passenv = - HOME DOCKER_BUILDKIT -whitelist_external = - true +passenv = HOME,DOCKER_BUILDKIT +allowlist_externals = + /bin/bash commands = ansible-builder build -v3 -c . -t quay.io/lumarel/ee-default {posargs} --build-arg EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.12-latest --container-runtime=docker [testenv:check-diff] -passenv = - {[testenv:docker]passenv} +passenv = {[testenv:docker]passenv} +allowlist_externals = + /bin/bash + {toxinidir}/tools/check_ansible_builder_changed.sh commands = {[testenv:docker]commands} {toxinidir}/tools/check_ansible_builder_changed.sh From 8e4ac853d7f3288c550310b9aaee8e5b0d1a9226 Mon Sep 17 00:00:00 2001 From: lumarel Date: Thu, 12 Jan 2023 23:43:44 +0100 Subject: [PATCH 2/2] Some stuff from upstream --- Containerfile | 7 +++++-- _build/requirements.txt | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index e48874e..86227ae 100644 --- a/Containerfile +++ b/Containerfile @@ -2,18 +2,20 @@ ARG EE_BUILDER_IMAGE=quay.io/ansible/ansible-builder:latest FROM $EE_BASE_IMAGE as galaxy ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS= +ARG ANSIBLE_GALAXY_CLI_ROLE_OPTS= USER root ADD _build /build WORKDIR /build -RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles -RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections +RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path "/usr/share/ansible/roles" +RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections" FROM $EE_BUILDER_IMAGE as builder COPY --from=galaxy /usr/share/ansible /usr/share/ansible +ADD _build/requirements.txt requirements.txt ADD _build/bindep.txt bindep.txt RUN ansible-builder introspect --sanitize --user-bindep=bindep.txt --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt RUN assemble @@ -34,3 +36,4 @@ ADD run.sh /run.sh CMD /run.sh USER 1000 RUN git lfs install +LABEL ansible-execution-environment=true diff --git a/_build/requirements.txt b/_build/requirements.txt index e171061..4dc36b0 100644 --- a/_build/requirements.txt +++ b/_build/requirements.txt @@ -1,4 +1,4 @@ -ansible-runner>=2.2.1 +ansible-runner>=2.3.1 dnspython netaddr