From 7175dcf7bafad7e9648256f1d7e0223fc9a31c97 Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Wed, 13 Aug 2025 16:35:16 -0500 Subject: [PATCH] more small fixes --- Jenkinsfile | 2 +- lib/docker.sh | 25 +++++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6ef74ba..7e1843d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { name 'DISTRO' values 'ubuntu-22.04', 'ubuntu-24.04', 'debian-12', 'fedora-42', - 'ogarcia/archlinux-latest' + 'archlinux-latest' } axis { name 'ARCH' diff --git a/lib/docker.sh b/lib/docker.sh index 437a1b0..e4b7ffe 100644 --- a/lib/docker.sh +++ b/lib/docker.sh @@ -4,7 +4,7 @@ VALID_DOCKER_IMAGES=( 'ubuntu-22.04' 'ubuntu-24.04' 'fedora-41' 'fedora-42' 'debian-12' - 'ogarcia/archlinux-latest' + 'archlinux-latest' ) DOCKER_WORKDIR='/workdir' DOCKER_RUN_FLAGS=( @@ -78,13 +78,15 @@ docker_build_image() { PLATFORM="${PLATFORM:-$(echo_platform)}" for distro in "${DISTROS[@]}"; do - image_tag="$(set_distro_image_tag "${distro}")" - echo_info "sourcing package manager for ${image_tag}" + echo_info "sourcing package manager for ${distro}" + # custom multi-arch image for archlinux + test "${distro}" == 'archlinux-latest' && \ + distro='ogarcia/archlinux-latest' # docker expects colon instead of dash dockerDistro="${distro//-/:}" # specific file for evaluated package manager info - distroPkgMgr="${DOCKER_DIR}/$(bash_basename "${distro}")-pkg_mgr)" + distroPkgMgr="${DOCKER_DIR}/$(bash_basename "${distro}")-pkg_mgr" # get package manager info # TODO REMOVE @@ -147,6 +149,7 @@ docker_build_image() { } >"${dockerfile}" + image_tag="$(set_distro_image_tag "${distro}")" docker buildx build \ --platform "${PLATFORM}" \ -t "${image_tag}" \ @@ -208,29 +211,35 @@ docker_run_image() { check_docker || return 1 for distro in "${DISTROS[@]}"; do - image_tag="$(set_distro_image_tag "${distro}")" + # custom multi-arch image for arch + test "${distro}" == 'archlinux-latest' && \ + distro='ogarcia/archlinux-latest' + # docker expects colon instead of dash + dockerDistro="${distro//-/:}" # TODO REMOVE if is_root_owned "${IGN_DIR}"; then docker run \ "${DOCKER_RUN_FLAGS[@]}" \ - "${image_tag}" \ + "${dockerDistro}" \ chown -R "$(id -u):$(id -g)" "${DOCKER_WORKDIR}"/gitignore fi if ! echo_if_fail ls; then docker run \ "${DOCKER_RUN_FLAGS[@]}" \ - "${image_tag}" \ + "${dockerDistro}" \ chown -R "$(id -u):$(id -g)" "${DOCKER_WORKDIR}"/gitignore fi testfile="${PREFIX}/ffmpeg-build-testfile" if ! touch "${testfile}" 2>/dev/null; then docker run \ "${DOCKER_RUN_FLAGS[@]}" \ - "${image_tag}" \ + "${dockerDistro}" \ chown -R "$(id -u):$(id -g)" "${DOCKER_WORKDIR}"/gitignore fi + image_tag="$(set_distro_image_tag "${distro}")" + # if a docker registry is defined, pull from it if [[ ${DOCKER_REGISTRY} != '' ]]; then docker_login || return 1