9 lines
681 B
Docker
Executable File
9 lines
681 B
Docker
Executable File
FROM python:3.13-slim-trixie
|
|
RUN pip install --no-cache-dir 'ansible-core>=2.18,<2.19' 'kubernetes>=28,<34' PyYAML 'kubernetes-validate>=1.31,<1.35'
|
|
COPY requirements.yml /tmp/requirements.yml
|
|
RUN ansible-galaxy collection install -r /tmp/requirements.yml
|
|
WORKDIR /roles/ansible-role-www
|
|
COPY . ./
|
|
ENV ANSIBLE_ROLES_PATH=/roles ANSIBLE_LOCAL_TEMP=/tmp/ansible-local
|
|
CMD ["sh", "-ec", "ansible-playbook -i localhost, tests/test.yml --syntax-check; ansible-playbook -i localhost, tests/syntax.yml --syntax-check; ansible-playbook -i localhost, tests/syntax.yml --tags membership_validate; ansible-playbook -i localhost, tests/render.yml; python tests/validate_manifests.py"]
|