Skip to content
Snippets Groups Projects
Commit 80fe0cbf authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

New

parent 9a17af5d
No related branches found
No related tags found
1 merge request!16New
......@@ -22,6 +22,3 @@ test:
GIT_STRATEGY: "none"
script:
- drr "${CI_REGISTRY_IMAGE}:${CUSTOM_IMAGEPREFIX}-${CI_COMMIT_SHORT_SHA}" ansible --version
- drr "${CI_REGISTRY_IMAGE}:${CUSTOM_IMAGEPREFIX}-${CI_COMMIT_SHORT_SHA}" ansible -m ping localhost
- drr "${CI_REGISTRY_IMAGE}:${CUSTOM_IMAGEPREFIX}-${CI_COMMIT_SHORT_SHA}" ansible-lint --version
- drr "${CI_REGISTRY_IMAGE}:${CUSTOM_IMAGEPREFIX}-${CI_COMMIT_SHORT_SHA}" ansible-lint .
FROM pipelinecomponents/ansible-lint:latest
FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
ENV PATH="/opt/ansible/bin:$PATH"
RUN apk --no-cache add python3 && \
apk --no-cache add --virtual build-dependencies \
py3-pip \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
&& \
python3 -m venv /opt/ansible && \
pip3 install --ignore-installed --no-cache-dir --upgrade \
pip \
setuptools \
wheel \
&& \
pip3 install --ignore-installed --no-cache-dir \
ansible \
ansible-lint \
mitogen \
jmespath \
pywinrm \
&& \
apk del build-dependencies && \
rm -rf /var/cache/apk/*
WORKDIR /opt/ansible
RUN apk add --no-cache git git-lfs openssh-client rsync
FROM registry.cyberbrain.pw/docker/alpine:latest AS runtime
ENV PATH="/opt/ansible/bin:$PATH"
WORKDIR /srv/ansible
RUN apk --no-cache add \
python3 \
openssl \
ca-certificates \
sshpass \
openssh-client \
rsync \
git
COPY --from=builder /opt/ansible /opt/ansible
CMD [ "ansible", "--version" ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment