Preset Git safe.directory property

This change ensures that Git will consider all
directories as safe within the container.

Also switched to libyaml-dev package 0.2.2 instead
of built from source 0.2.5

Change-Id: I2c161b8504ad9c401531fd3fdcb121eafa633dd7
This commit is contained in:
Sergiy Markin 2025-02-04 01:58:44 +00:00
parent 65421815e1
commit 071c3d41f1
4 changed files with 33 additions and 16 deletions

View File

@ -7,4 +7,6 @@ libpq-dev [platform:dpkg]
libsasl2-dev [platform:dpkg]
libssl-dev [platform:dpkg]
libre2-dev [platform:dpkg]
libzmq3-dev [platform:dpkg]
libzmq3-dev [platform:dpkg]
libyaml-dev [platform:dpkg]
golang-cfssl [platform:dpkg]

3
entrypoint.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
git config --global --add safe.directory "*"
exec "$@"

View File

@ -42,6 +42,10 @@ RUN set -ex \
python3-dev \
python3-pip \
python3-setuptools \
# this will install libyaml 0.2.22 in Jammy
libyaml-dev \
# this will install golang-cfssl 1.2.0 in Jammy
golang-cfssl \
&& python3 -m pip install -U pip \
&& apt autoremove -yqq --purge \
&& apt clean \
@ -56,17 +60,17 @@ RUN set -ex \
ENV LD_LIBRARY_PATH=/usr/local/lib
ARG LIBYAML_VERSION=0.2.5
RUN set -ex \
&& git clone https://github.com/yaml/libyaml.git \
&& cd libyaml \
&& git checkout $LIBYAML_VERSION \
&& ./bootstrap \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -fr libyaml
# ARG LIBYAML_VERSION=0.2.5
# RUN set -ex \
# && git clone https://github.com/yaml/libyaml.git \
# && cd libyaml \
# && git checkout $LIBYAML_VERSION \
# && ./bootstrap \
# && ./configure \
# && make \
# && make install \
# && cd .. \
# && rm -fr libyaml
VOLUME /var/pegleg
WORKDIR /var/pegleg
@ -77,8 +81,14 @@ RUN pip3 install -r https://opendev.org/airship/deckhand/raw/${DECKHAND_VERSION}
&& pip3 install -r https://opendev.org/airship/shipyard/raw/${SHIPYARD_VERSION}/src/bin/shipyard_client/requirements-frozen.txt \
&& pip3 install --no-cache-dir -r /opt/pegleg/requirements.txt
COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh
RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL}
# COPY tools/install-cfssl.sh /opt/pegleg/tools/install-cfssl.sh
# RUN /opt/pegleg/tools/install-cfssl.sh ${CFSSLURL}
COPY . /opt/pegleg
RUN pip3 install -e /opt/pegleg --use-pep517
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["pegleg", "--help"]

View File

@ -27,7 +27,8 @@ allowlist_externals =
find
commands =
find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh"
# moved into bindep.txt
# bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-unit-tests.sh '{posargs}'"
@ -86,7 +87,8 @@ commands =
basepython = python3
commands =
find . -type f -name "*.pyc" -delete
bash -c "{toxinidir}/tools/install-cfssl.sh"
# moved into bindep.txt
# bash -c "{toxinidir}/tools/install-cfssl.sh"
bash -c "{toxinidir}/tools/gate/run-cover-tests.sh '{posargs}'"
allowlist_externals =
bash