Skip to content

Commit

Permalink
Check test images
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
  • Loading branch information
tiraboschi committed Mar 14, 2024
1 parent fc37f62 commit 2526041
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ chain:
- as: conformance-tests
from: tests
commands: |-
set -x
function mirror_test_images() {
echo "### Mirroring test images"
DEVSCRIPTS_TEST_IMAGE_REPO=${DS_REGISTRY}/localimages/local-test-image
openshift-tests images --to-repository ${DEVSCRIPTS_TEST_IMAGE_REPO} > /tmp/mirror
cat /tmp/mirror
scp "${SSHOPTS[@]}" /tmp/mirror "root@${IP}:/tmp/mirror"
# shellcheck disable=SC2087
Expand All @@ -19,6 +22,23 @@ chain:
oc image mirror --registry-config ${DS_WORKING_DIR}/pull_secret.json --filter-by-os="linux/${ARCHITECTURE}.*" registry.k8s.io/pause:3.9 $DEVSCRIPTS_TEST_IMAGE_REPO:e2e-27-registry-k8s-io-pause-3-9-p9APyPDU5GsW02Rk
EOF
TEST_ARGS+=$(echo " --from-repository ${DEVSCRIPTS_TEST_IMAGE_REPO} ")
# TODO: why do we need this?
# TODO: can we avoid hardcoding this list?
for isName in cli cli-artifacts driver-toolkit installer installer-artifacts must-gather network-tools oauth-proxy tests tools; do
OVERRIDES=$(oc get clusterversion version -o=jsonpath={.spec.overrides})
if [ -z "$OVERRIDES" ]
then
oc patch clusterversion version --type json -p '[{"op": "add", "path": "/spec/overrides", "value": []}]'
fi
oc patch clusterversion version --type json -p "[{\"op\": \"add\", \"path\": \"/spec/overrides/-\", \"value\": {\"kind\": \"ImageStream\", \"group\": \"image.openshift.io\", \"namespace\": \"openshift\", \"name\": \"${isName}\", \"unmanaged\": true}}]"
FROM=$(oc get imagestream -n openshift ${isName} -o=jsonpath={.spec.tags[0].from.name})
EXT_REG=${FROM%%@*}
INT_PULL_URL=${FROM/$EXT_REG/$DEVSCRIPTS_TEST_IMAGE_REPO}
oc patch imagestream -n openshift ${isName} --type json -p '[{"op": "remove", "path": "/metadata/ownerReferences"}]' || true
oc patch imagestream -n openshift ${isName} --type json -p "[{\"op\": \"replace\", \"path\": \"/spec/tags/0/from/name\", \"value\": \"${INT_PULL_URL}\"}]"
done
}
CLUSTER_NAME="$(echo -n $PROW_JOB_ID|sha256sum|cut -c-20)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ workflow:
allow_best_effort_post_steps: true
allow_skip_on_success: true
post:
- ref: wait # TODO: remove me
- ref: hypershift-mce-dump
- chain: gather-core-dump
- chain: hypershift-mce-kubevirt-destroy
Expand Down
2 changes: 1 addition & 1 deletion ci-operator/step-registry/wait/wait-ref.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ref:
as: wait
from: cli
from: upi-installer
grace_period: 5m
timeout: 72h0m0s
cli: latest
Expand Down

0 comments on commit 2526041

Please sign in to comment.