lint: Use $CI_RETRY_EXE when building ./ci/lint_imagefile

Previous code was confusing and brittle. For example, the full import
"source ./ci/test/00_setup_env.sh" and $PATH overwrite was not needed.

Fix it by simply copying the exe to /ci_retry and use that in
$CI_RETRY_EXE.

This is also a fix, because previously ci/lint_imagefile did use an
empty $CI_RETRY_EXE.
This commit is contained in:
MarcoFalke 2024-07-22 13:18:31 +02:00
parent a1b8a917b1
commit fa9ad59f87
No known key found for this signature in database
3 changed files with 5 additions and 4 deletions

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright (c) 2018-2022 The Bitcoin Core developers # Copyright (c) 2018-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C export LC_ALL=C
export PATH=$PWD/ci/retry:$PATH export CI_RETRY_EXE="/ci_retry --"
${CI_RETRY_EXE} apt-get update ${CI_RETRY_EXE} apt-get update
# Lint dependencies: # Lint dependencies:

View File

@ -9,6 +9,7 @@ FROM debian:bookworm
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
COPY ./ci/retry/retry /ci_retry
COPY ./.python-version /.python-version COPY ./.python-version /.python-version
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
COPY ./ci/lint/04_install.sh /install.sh COPY ./ci/lint/04_install.sh /install.sh

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Copyright (c) 2019-2020 The Bitcoin Core developers # Copyright (c) 2019-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
set -o errexit; source ./ci/test/00_setup_env.sh cp "./ci/retry/retry" "/ci_retry"
set -o errexit; source ./ci/lint/04_install.sh set -o errexit; source ./ci/lint/04_install.sh
set -o errexit set -o errexit
./ci/lint/06_script.sh ./ci/lint/06_script.sh