Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/assets/kustomizations/greenboot/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ resources:
- busybox.yaml
images:
- name: BUSYBOX_IMAGE
newName: busybox:1.35
newName: quay.io/microshift/busybox:1.36
5 changes: 5 additions & 0 deletions test/bin/mirror_registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ mirror_images() {
echo "${src_img}" >> "${ffile}"
done

# Add test assets images.
find "${SCRIPTDIR}/../assets/" -type f -exec grep -hPo "(?<=image: ).*\..*" {} \; | while read -r img; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find "${SCRIPTDIR}/../assets/" -type f -exec grep -hPo "(?<=image: ).*\..*" {} \; | while read -r img; do
find "${SCRIPTDIR}/../assets/" -type f -exec awk '/quay.io/ {print $NF}' {} \; | while read -r img; do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable, there are images from 3 different sources and also images: has 2 different formats. This captures any domain name after images:, whatever the format it has.

echo "${img}" >> "${ffile}"
done

sort -u "${ifile}" "${ffile}" > "${ofile}"
"${ROOTDIR}/scripts/mirror-images.sh" --mirror "${QUAY_PULL_SECRET}" "${ofile}" "${MIRROR_REGISTRY_URL}"
rm -f "${ofile}" "${ffile}"
Expand Down
6 changes: 3 additions & 3 deletions test/kickstart-templates/includes/post-containers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ EOF

# Setup mirror registries configuration here, as the hostname is dynamic and the file is verbose.
# Use hostnames as IP addresses are not allowed.
# Mirroring happens for both digests(MicroShift itself) and tags (because of tests). There is
# no risk of stale images when mirroring by tags because the VMs are meant to be short lived
# and mirroring happens right before running the tests.
mkdir -p /etc/containers/registries.conf.d
cat > /etc/containers/registries.conf.d/999-microshift-mirror.conf <<'EOF'
[[registry]]
prefix = ""
location = "REPLACE_MIRROR_HOSTNAME:REPLACE_MIRROR_PORT"
mirror-by-digest-only = true
insecure = true

[[registry]]
prefix = ""
location = "quay.io"
mirror-by-digest-only = true
[[registry.mirror]]
location = "REPLACE_MIRROR_HOSTNAME:REPLACE_MIRROR_PORT/microshift"
insecure = true

[[registry]]
prefix = ""
location = "registry.redhat.io"
mirror-by-digest-only = true
[[registry.mirror]]
location = "REPLACE_MIRROR_HOSTNAME:REPLACE_MIRROR_PORT/microshift"
insecure = true
Expand Down