Commit 80fe0cbf authored by Дмитрий Сафронов's avatar Дмитрий Сафронов
Browse files

New

parent 9a17af5d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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 .
+39 −4
Original line number Diff line number Diff line
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" ]