diff --git a/legacy/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile b/legacy/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile index f3e9f56..15fc9a8 100644 --- a/legacy/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile +++ b/legacy/runner/actions-runner-dind-rootless.ubuntu-20.04.dockerfile @@ -136,6 +136,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile b/legacy/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile index af58f88..294b43b 100644 --- a/legacy/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile +++ b/legacy/runner/actions-runner-dind-rootless.ubuntu-22.04.dockerfile @@ -114,6 +114,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/actions-runner-dind.ubuntu-20.04.dockerfile b/legacy/runner/actions-runner-dind.ubuntu-20.04.dockerfile index 63c5ae9..5739be4 100644 --- a/legacy/runner/actions-runner-dind.ubuntu-20.04.dockerfile +++ b/legacy/runner/actions-runner-dind.ubuntu-20.04.dockerfile @@ -144,6 +144,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/actions-runner-dind.ubuntu-22.04.dockerfile b/legacy/runner/actions-runner-dind.ubuntu-22.04.dockerfile index a483aa8..51a9bd9 100644 --- a/legacy/runner/actions-runner-dind.ubuntu-22.04.dockerfile +++ b/legacy/runner/actions-runner-dind.ubuntu-22.04.dockerfile @@ -120,6 +120,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/actions-runner.ubuntu-20.04.dockerfile b/legacy/runner/actions-runner.ubuntu-20.04.dockerfile index 3821204..a6428c6 100644 --- a/legacy/runner/actions-runner.ubuntu-20.04.dockerfile +++ b/legacy/runner/actions-runner.ubuntu-20.04.dockerfile @@ -140,6 +140,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/actions-runner.ubuntu-22.04.dockerfile b/legacy/runner/actions-runner.ubuntu-22.04.dockerfile index 2b5aca7..d36352e 100644 --- a/legacy/runner/actions-runner.ubuntu-22.04.dockerfile +++ b/legacy/runner/actions-runner.ubuntu-22.04.dockerfile @@ -117,6 +117,7 @@ RUN apt-get update -y \ make \ wget \ gnupg2 \ + tree \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/legacy/runner/hooks/job-completed.sh b/legacy/runner/hooks/job-completed.sh index 9bf775e..78b161c 100755 --- a/legacy/runner/hooks/job-completed.sh +++ b/legacy/runner/hooks/job-completed.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -# shellcheck source=runner/logger.sh +# shellcheck source=../logger.sh source logger.sh log.debug "Running ARC Job Completed Hooks" diff --git a/legacy/runner/hooks/job-started.d/authorize-jfrog b/legacy/runner/hooks/job-started.d/authorize-jfrog index 7e8d0c1..10f16d8 100755 --- a/legacy/runner/hooks/job-started.d/authorize-jfrog +++ b/legacy/runner/hooks/job-started.d/authorize-jfrog @@ -2,6 +2,9 @@ set +e set -o pipefail +# shellcheck source=../../logger.sh +source logger.sh + if [[ -z "${RUNNER_JF_SERVER_URL}" ]]; then log.info "Skipping JFrog authorization as RUNNER_JF_URL is not set." exit 0 diff --git a/legacy/runner/hooks/job-started.d/configure-buildkit-mirror b/legacy/runner/hooks/job-started.d/configure-buildkit-mirror new file mode 100755 index 0000000..ec496fa --- /dev/null +++ b/legacy/runner/hooks/job-started.d/configure-buildkit-mirror @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +set +e +set -o pipefail + +# shellcheck source=../../logger.sh +source logger.sh + +readonly BUILDKIT_MIRROR_CONFIG_FILE="/etc/docker/buildkitd.toml" + +if [[ -z "${DOCKER_REGISTRY_MIRROR}" ]]; then + log.info "Skipping BuildKit mirror configuration as DOCKER_REGISTRY_MIRROR is not set." + exit 0 +fi + +function render_config() { + local mirror="${1}" + + [[ -z "${mirror}" ]] && return 1 + + cat < /dev/null +EC="${?}" + +if [[ "${EC}" -ne 0 ]]; then + log.error "Failed to write BuildKit configuration file: ${BUILDKIT_MIRROR_CONFIG_FILE}" + exit "${EC}" +fi + +log.info "Successfully configured BuildKit with docker registry mirror: ${DOCKER_REGISTRY_HOSTNAME}" diff --git a/legacy/runner/hooks/job-started.sh b/legacy/runner/hooks/job-started.sh index 4b49c22..ab76165 100644 --- a/legacy/runner/hooks/job-started.sh +++ b/legacy/runner/hooks/job-started.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -Eeuo pipefail -# shellcheck source=runner/logger.sh +# shellcheck source=../logger.sh source logger.sh log.debug "Running ARC Job Started Hooks"