Skip to content

Commit

Permalink
Merge pull request #8 from lumarel/fix/getting-back-to-upstream
Browse files Browse the repository at this point in the history
Fix/getting back to upstream
  • Loading branch information
lumarel authored Jan 12, 2023
2 parents f7de1cd + 8e4ac85 commit 85f4a80
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 29 deletions.
7 changes: 5 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,3 +36,4 @@ ADD run.sh /run.sh
CMD /run.sh
USER 1000
RUN git lfs install
LABEL ansible-execution-environment=true
2 changes: 1 addition & 1 deletion _build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible-runner>=2.2.1
ansible-runner>=2.3.1

dnspython
netaddr
Expand Down
48 changes: 22 additions & 26 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 85f4a80

Please sign in to comment.