Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dockers:
extra_files:
- "images/ansible-operator/Pipfile"
- "images/ansible-operator/Pipfile.lock"
- "images/ansible-operator/ansible_runner_http"
- image_templates:
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-arm64"
dockerfile: images/ansible-operator/Dockerfile
Expand All @@ -58,6 +59,7 @@ dockers:
extra_files:
- "images/ansible-operator/Pipfile"
- "images/ansible-operator/Pipfile.lock"
- "images/ansible-operator/ansible_runner_http"
- image_templates:
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-ppc64le"
dockerfile: images/ansible-operator/Dockerfile
Expand All @@ -72,6 +74,7 @@ dockers:
extra_files:
- "images/ansible-operator/Pipfile"
- "images/ansible-operator/Pipfile.lock"
- "images/ansible-operator/ansible_runner_http"
- image_templates:
- "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}-s390x"
dockerfile: images/ansible-operator/Dockerfile
Expand All @@ -86,6 +89,7 @@ dockers:
extra_files:
- "images/ansible-operator/Pipfile"
- "images/ansible-operator/Pipfile.lock"
- "images/ansible-operator/ansible_runner_http"
docker_manifests:
- name_template: "{{ .Env.IMAGE_REPO }}:{{ .Env.IMAGE_TAG }}"
image_templates:
Expand Down
11 changes: 7 additions & 4 deletions images/ansible-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ RUN rustc --version

# Copy python dependencies (including ansible) to be installed using Pipenv
COPY images/ansible-operator/Pipfile* ./
# Copy our local ansible-runner-http replacement module
COPY images/ansible-operator/ansible_runner_http ./ansible_runner_http
# Instruct pip(env) not to keep a cache of installed packages,
# to install into the global site-packages and
# to clear the pipenv cache as well
ENV PIP_NO_CACHE_DIR=1 \
PIPENV_SYSTEM=1 \
PIPENV_CLEAR=1
PIPENV_SYSTEM=1 \
PIPENV_CLEAR=1
# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
# and remove those not needed at runtime.
RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
Expand All @@ -27,6 +29,7 @@ RUN set -e && dnf clean all && rm -rf /var/cache/dnf/* \
&& pip3 install --upgrade pip~=23.3.2 \
&& pip3 install pipenv==2023.11.15 \
&& pipenv install --deploy \
&& pip3 install ansible_runner_http/ \
&& pipenv check \
&& dnf remove -y gcc libffi-devel openssl-devel python3.12-devel \
&& dnf clean all \
Expand Down Expand Up @@ -63,8 +66,8 @@ RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VE
FROM base AS final

ENV HOME=/opt/ansible \
USER_NAME=ansible \
USER_UID=1001
USER_NAME=ansible \
USER_UID=1001

# Ensure directory permissions are properly set
RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd \
Expand Down
4 changes: 2 additions & 2 deletions images/ansible-operator/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ name = "pypi"

[packages]
ansible-runner = "~=2.4.0"
ansible-runner-http = "~=1.0.0"
requests = "~=2.32.5"
requests-unixsocket = "==0.4.1"
ansible-core = "~=2.18.3"
urllib3 = "~=2.5.0"
kubernetes = "==33.1.0"
requests = "~=2.32.5"

[dev-packages]

Expand Down
178 changes: 94 additions & 84 deletions images/ansible-operator/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .events import status_handler, event_handler # noqa
Loading