Skip to content

Commit

Permalink
Allow external configuration of download host for production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
joepvd committed Nov 22, 2024
1 parent fd32b76 commit 52aff6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.ci.openshift.org/ocp/4.18:installer AS builder

ARG DIRECT_DOWNLOAD=false
ENV ISO_HOST=https://example.com

USER root:root

Expand Down
4 changes: 2 additions & 2 deletions fetch_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ download_url() {
local iso_sha256
iso_sha256="$(image_data "${arch}" sha256)"

wget "$@" "${url}" -O "${iso_file}"
wget --quiet "$@" "${url}" -O "${iso_file}"
local actual_sha256
actual_sha256="$(sha256sum "${iso_file}" | cut -d' ' -f1)"
if [ "${actual_sha256}" != "${iso_sha256}" ]; then
Expand All @@ -45,7 +45,7 @@ download_art_arch() {

local origurl
origurl="$(image_data "${arch}" location)"
local url="https://releases-rhcos-art.apps.ocp-virt.prod.psi.redhat.com/${origurl#*.com/art/}"
local url="$ISO_HOST/${origurl#*.com/art/}"

download_url "${arch}" "${url}" --no-check-certificate # skipping certificate check is ok because we will check its sha256 in any case.
}
Expand Down

0 comments on commit 52aff6b

Please sign in to comment.