refactor(docker_cache): cleanup commands and place items in alphanumerical order
!184
This commit is contained in:
@ -50,7 +50,8 @@ Build/Cache Python Packages:
|
|||||||
--platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
--platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
||||||
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN \
|
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN \
|
||||||
--build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
--build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
||||||
--build-arg CI_PROJECT_ID=$CI_PROJECT_ID
|
--build-arg CI_PROJECT_ID=$CI_PROJECT_ID \
|
||||||
|
--progress plain
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||||
when: never
|
when: never
|
||||||
|
@ -6,78 +6,90 @@ ARG CI_PROJECT_ID
|
|||||||
|
|
||||||
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
|
|
||||||
ENV PATH /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin::~/.cargo/bin
|
ENV PATH /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin::~/.cargo/bin
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
&& dpkg-reconfigure debconf -f noninteractive
|
|
||||||
|
|
||||||
RUN apt update \
|
|
||||||
# SoF fixing dpkg ldconfig not found error
|
RUN dpkg-reconfigure debconf -f noninteractive
|
||||||
&& cd /tmp \
|
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
|
||||||
|
# SoF fixing dpkg ldconfig not found error
|
||||||
|
# Download Binary
|
||||||
|
RUN cd /tmp \
|
||||||
&& apt-get download \
|
&& apt-get download \
|
||||||
libc-bin \
|
libc-bin
|
||||||
&& dpkg --extract ./libc-bin_*.deb /tmp/deb \
|
|
||||||
&& cp /tmp/deb/sbin/ldconfig /sbin/ \
|
RUN ls -la
|
||||||
&& rm -Rf /tmp/deb \
|
|
||||||
&& rm libc-bin_*.deb \
|
# Extract Binary
|
||||||
&& apt-get install --reinstall \
|
RUN cd /tmp; \
|
||||||
libc-bin \
|
dpkg --extract $(ls | grep libc-bin_ | grep -a '.deb') /tmp/deb; ls -laR
|
||||||
# EoF fixing dpkg ldconfig not found error
|
|
||||||
# Set Locale to en_US as ansible requires a locale for it to function without chucking a tantrum!!
|
# # Extracted?
|
||||||
&& apt install --reinstall -yq \
|
# RUN ls -laR
|
||||||
git \
|
|
||||||
|
# Copy to home location
|
||||||
|
RUN cp /tmp/deb/sbin/ldconfig /sbin/
|
||||||
|
|
||||||
|
# Confirm present
|
||||||
|
RUN ls -l /sbin/ldconfig
|
||||||
|
|
||||||
|
# Confirm can be found
|
||||||
|
RUN which ldconfig
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
# RUN rm -Rf /tmp/deb \
|
||||||
|
# && rm libc-bin_*.deb
|
||||||
|
|
||||||
|
# Should re-install without issue
|
||||||
|
RUN apt-get install --reinstall \
|
||||||
|
libc-bin
|
||||||
|
# EoF fixing dpkg ldconfig not found error
|
||||||
|
# Set Locale to en_US as ansible requires a locale for it to function without chucking a tantrum!!
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt install -yq \
|
||||||
|
build-essential \
|
||||||
|
cargo \
|
||||||
curl \
|
curl \
|
||||||
rustc cargo \
|
git \
|
||||||
libpq-dev || true
|
libffi-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libssl-dev \
|
||||||
RUN mkdir -p /tmp/python_modules /tmp/python_builds
|
mariadb-client \
|
||||||
|
openssh-client \
|
||||||
|
pkg-config \
|
||||||
|
postgresql-client \
|
||||||
|
postgresql-common \
|
||||||
|
python3-dev \
|
||||||
|
rustc
|
||||||
|
|
||||||
|
|
||||||
RUN rustc --version \
|
RUN rustc --version \
|
||||||
&& cargo --version
|
&& cargo --version
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt update \
|
|
||||||
&& apt --fix-broken install \
|
|
||||||
&& apt install -y libc-bin locales-all \
|
|
||||||
&& apt update \
|
|
||||||
&& apt install --reinstall -yq \
|
|
||||||
openssh-client \
|
|
||||||
git || true \
|
|
||||||
&& dpkg --purge --force-all libc-bin \
|
|
||||||
&& apt-get install -y \
|
|
||||||
openssh-client \
|
|
||||||
git \
|
|
||||||
postgresql-common \
|
|
||||||
postgresql-client \
|
|
||||||
mariadb-client \
|
|
||||||
build-essential
|
|
||||||
|
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt update \
|
|
||||||
&& apt install --no-install-recommends -yq libc-bin locales-all \
|
|
||||||
&& apt-get install --reinstall -yq \
|
|
||||||
build-essential \
|
|
||||||
libssl-dev \
|
|
||||||
libffi-dev \
|
|
||||||
python3-dev \
|
|
||||||
cargo \
|
|
||||||
pkg-config \
|
|
||||||
libpq-dev || true
|
|
||||||
|
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
|
||||||
RUN pip install --upgrade \
|
RUN pip install --upgrade \
|
||||||
setuptools \
|
setuptools \
|
||||||
wheel \
|
wheel \
|
||||||
setuptools-rust \
|
setuptools-rust \
|
||||||
twine
|
twine
|
||||||
|
|
||||||
|
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
RUN mkdir -p /tmp/python_modules /tmp/python_builds
|
||||||
|
|
||||||
|
|
||||||
RUN cd /tmp/python_modules \
|
RUN cd /tmp/python_modules \
|
||||||
&& pip download --dest . --check-build-dependencies \
|
&& pip download --dest . --check-build-dependencies \
|
||||||
-r /tmp/requirements.txt
|
-r /tmp/requirements.txt
|
||||||
@ -88,5 +100,8 @@ RUN cd /tmp/python_modules \
|
|||||||
&& echo "[DEBUG] PATH=$PATH" \
|
&& echo "[DEBUG] PATH=$PATH" \
|
||||||
&& pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl
|
&& pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl
|
||||||
|
|
||||||
|
RUN cd /tmp; \
|
||||||
|
ls -laR
|
||||||
|
|
||||||
|
|
||||||
RUN TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi /tmp/python_builds/*
|
RUN TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi /tmp/python_builds/*
|
||||||
|
Reference in New Issue
Block a user