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 25, 2024
1 parent cfd9152 commit 7501bea
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ tests:
HYPERSHIFT_NODE_COUNT: "2"
MCE_VERSION: "2.4"
ODF_OPERATOR_SUB_CHANNEL: stable-4.14
TEST_SKIPS: \[sig-imageregistry\]\[Feature:ImageLookup\] Image policy should
update OpenShift object image fields when local names are on \[apigroup:image.openshift.io\]\[apigroup:apps.openshift.io\]\|
\[sig-imageregistry\]\[Feature:ImageLookup\] Image policy should update standard
Kube object image fields when local names are on \[apigroup:image.openshift.io\]\|
\[sig-imageregistry\]\[Feature:Image\] oc tag should preserve image reference
for external images \[apigroup:image.openshift.io\] \[Suite:openshift/conformance/parallel\]\|
\[sig-imageregistry\]\[Feature:ImageLookup\] Image policy should perform lookup
when the Deployment gets the resolve-names annotation later \[apigroup:image.openshift.io\]\|
\[sig-imageregistry\]\[Feature:ImageLookup\] Image policy should perform lookup
when the object has the resolve-names annotation \[apigroup:image.openshift.io\]
workflow: hypershift-mce-kubevirt-baremetalds-disconnected-conformance
- as: e2e-mce-power-conformance
cron: 0 4 * * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ postsubmits:
always_run: true
branches:
- ^master$
cluster: build10
cluster: build09
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build10
ci-operator.openshift.io/cluster: build09
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
max_concurrency: 1
Expand Down Expand Up @@ -47,8 +47,6 @@ postsubmits:
- mountPath: /etc/report
name: result-aggregator
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ presubmits:
branches:
- ^master$
- ^master-
cluster: build02
cluster: build09
context: ci/prow/images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build09
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-qe-baremetal-qe-infra-master-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ postsubmits:
always_run: true
branches:
- ^staging$
cluster: build10
cluster: build09
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build10
ci-operator.openshift.io/cluster: build09
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
max_concurrency: 1
Expand Down Expand Up @@ -47,8 +47,6 @@ postsubmits:
- mountPath: /etc/report
name: result-aggregator
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ presubmits:
branches:
- ^staging$
- ^staging-
cluster: build02
cluster: build09
context: ci/prow/images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build09
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-qe-baremetal-qe-infra-staging-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ postsubmits:
always_run: true
branches:
- ^main$
cluster: build10
cluster: build09
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build10
ci-operator.openshift.io/cluster: build09
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
max_concurrency: 1
Expand Down Expand Up @@ -47,8 +47,6 @@ postsubmits:
- mountPath: /etc/report
name: result-aggregator
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,13 @@ presubmits:
branches:
- ^main$
- ^main-
cluster: build02
cluster: build09
context: ci/prow/images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build09
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-multiarch-tuning-operator-main-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ postsubmits:
always_run: true
branches:
- ^release-4\.16$
cluster: build10
cluster: build09
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build10
ci-operator.openshift.io/cluster: build09
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
max_concurrency: 1
Expand Down Expand Up @@ -47,8 +47,6 @@ postsubmits:
- mountPath: /etc/report
name: result-aggregator
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,13 @@ presubmits:
branches:
- ^release-4\.16$
- ^release-4\.16-
cluster: build02
cluster: build09
context: ci/prow/images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build09
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-multiarch-tuning-operator-release-4.16-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ postsubmits:
always_run: true
branches:
- ^v0\.0\.1$
cluster: build10
cluster: build09
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build10
ci-operator.openshift.io/cluster: build09
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
max_concurrency: 1
Expand Down Expand Up @@ -47,8 +47,6 @@ postsubmits:
- mountPath: /etc/report
name: result-aggregator
readOnly: true
nodeSelector:
kubernetes.io/arch: amd64
serviceAccountName: ci-operator
volumes:
- name: manifest-tool-local-pusher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,13 @@ presubmits:
branches:
- ^v0\.0\.1$
- ^v0\.0\.1-
cluster: build02
cluster: build09
context: ci/prow/images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/cluster: build09
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-multiarch-tuning-operator-v0.0.1-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,51 @@ chain:
- as: conformance-tests
from: tests
commands: |-
set -x
function patch_image_streams() {
# TODO: file a bug and track this as a workaround!
# imagestreams on the hosted cluster are ignoring
# the CA injected at creation/(installation) time.
# see: https://issues.redhat.com/browse/RFE-3093
# and: https://github.com/openshift/enhancements/pull/416/commits/e46072ecf77b58c79b4bece5e0c6a5a5546a1b8a
echo "### Patching image streams on the hostedcluster"
echo "#### Add trust for the mirroring registry"
oc get cm -n openshift-config user-ca-bundle -o json | jq -r '.data["ca-bundle.crt"]' > /tmp/ca-bundle.crt
oc create configmap registry-config --from-file=${DS_REGISTRY//:/..}=/tmp/ca-bundle.crt -n openshift-config
oc patch image.config.openshift.io/cluster --patch '{"spec":{"additionalTrustedCA":{"name":"registry-config"}}}' --type=merge
sleep 60
DEVSCRIPTS_RELEASE_IMAGE_REPO=${DS_REGISTRY}/localimages/local-release-image
#PREV_KUBECONFIG=${KUBECONFIG}
#export KUBECONFIG=${SHARED_DIR}/nested_kubeconfig
IMAGESTREAMS=$(oc get imagestreams -n openshift -o=name)
for isName in ${IMAGESTREAMS}; do
echo "#### Patching ${isName} using insecure registry"
FROM=$(oc get -n openshift ${isName} -o=jsonpath={.spec.tags[0].from.name})
EXT_REG=${FROM%%@*}
INT_PULL_URL=${FROM/$EXT_REG/$DEVSCRIPTS_RELEASE_IMAGE_REPO}
oc patch -n openshift ${isName} --type json -p "[{\"op\": \"replace\", \"path\": \"/spec/tags/0/importPolicy/insecure\", \"value\": true}, {\"op\": \"replace\", \"path\": \"/spec/tags/0/from/name\", \"value\": \"${INT_PULL_URL}\"}]"
done
#export KUBECONFIG=${PREV_KUBECONFIG}
### tests like "services when running openshift cluster on KubeVirt virtual machines should allow connections to pods from infra cluster pod *"
### requires tools imagestream to be correctly refenced also on the infra cluster
isName=imagestream.image.openshift.io/tools
echo "#### Patching ${isName} using insecure registry"
FROM=$(oc --kubeconfig=${HYPERSHIFT_MANAGEMENT_CLUSTER_KUBECONFIG} get -n openshift ${isName} -o=jsonpath={.spec.tags[0].from.name})
EXT_REG=${FROM%%@*}
INT_PULL_URL=${FROM/$EXT_REG/$DEVSCRIPTS_RELEASE_IMAGE_REPO}
oc patch --kubeconfig=${HYPERSHIFT_MANAGEMENT_CLUSTER_KUBECONFIG} -n openshift ${isName} --type json -p "[{\"op\": \"replace\", \"path\": \"/spec/tags/0/importPolicy/insecure\", \"value\": true}, {\"op\": \"replace\", \"path\": \"/spec/tags/0/from/name\", \"value\": \"${INT_PULL_URL}\"}]"
###
}
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
scp "${SSHOPTS[@]}" /tmp/mirror "root@${IP}:/tmp/mirror"
Expand All @@ -17,7 +57,9 @@ chain:
oc image mirror -f /tmp/mirror --registry-config ${DS_WORKING_DIR}/pull_secret.json
oc image mirror --registry-config ${DS_WORKING_DIR}/pull_secret.json --filter-by-os="linux/${ARCHITECTURE}.*" registry.k8s.io/pause:3.8 $DEVSCRIPTS_TEST_IMAGE_REPO:e2e-28-registry-k8s-io-pause-3-8-aP7uYsw5XCmoDy5W
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
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-28-registry-k8s-io-pause-3-9-p9APyPDU5GsW02Rk
EOF
TEST_ARGS+=$(echo " --from-repository ${DEVSCRIPTS_TEST_IMAGE_REPO} ")
}
Expand Down Expand Up @@ -87,6 +129,7 @@ chain:
if [[ "${DISCONNECTED}" == "true" ]];
then
mirror_test_images
patch_image_streams
export TEST_PROVIDER='{"type":"kubevirt","disconnected":true}'
else
export TEST_PROVIDER='{"type":"kubevirt"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ spec:
source: quay.io/openshift-cnv
END
cat << END | oc apply -f -
apiVersion: config.openshift.io/v1
kind: ImageDigestMirrorSet
metadata:
name: redhat-operator-index-0-fixes
spec:
imageDigestMirrors:
- mirrors:
- \${mirror_registry}/openshift4/ose-kube-rbac-proxy
source: registry.redhat.io/openshift4/ose-kube-rbac-proxy
END
echo "7: Waiting for the new ImageContentSourcePolicy to be updated on machines"
oc wait clusteroperators/machine-config --for=condition=Upgradeable=true --timeout=15m
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 7501bea

Please sign in to comment.