From bdb4d718fafd6afa485a1f8eb92d85d75f631d12 Mon Sep 17 00:00:00 2001 From: Kui Wang Date: Thu, 15 Jan 2026 16:02:10 +0800 Subject: [PATCH] add bindata-check --- ...openshift-operator-framework-olm-main.yaml | 16 ++++++ ...or-framework-operator-controller-main.yaml | 16 ++++++ ...perator-framework-olm-main-presubmits.yaml | 54 +++++++++++++++++++ ...k-operator-controller-main-presubmits.yaml | 54 +++++++++++++++++++ 4 files changed, 140 insertions(+) diff --git a/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-main.yaml b/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-main.yaml index 4aaf3a43bf397..a6d8f6534ba85 100755 --- a/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-main.yaml +++ b/ci-operator/config/openshift/operator-framework-olm/openshift-operator-framework-olm-main.yaml @@ -181,6 +181,22 @@ tests: resources: requests: cpu: 100m +- as: bindata-check + commands: | + #currently only focus on qe testdata because all qe cases are sharing the same bindata go file. + cd tests-extension + make bindata + ret=0 && git diff --quiet pkg/bindata/qe/bindata.go || ret=$? + if [ $ret -ne 0 ]; then + echo "bindata is not correct updated by your PR, please refer to the following and re-execute \"make bindata\" on your terminal and then update PR" + echo "---" + git diff pkg/bindata/qe/bindata.go || true + echo "---" + exit 1 + fi + container: + from: src + run_if_changed: ^(tests-extension/test/qe/testdata/) - as: e2e-aws-olmv0-ext steps: cluster_profile: aws-4 diff --git a/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml b/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml index 3a6801856da44..e1e9790e83de3 100644 --- a/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml +++ b/ci-operator/config/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main.yaml @@ -180,6 +180,22 @@ tests: resources: requests: cpu: 100m +- as: bindata-check + commands: | + # currently only focus on qe testdata because all qe cases are sharing the same bindata go file. + cd openshift/tests-extension + make bindata + ret=0 && git diff --quiet pkg/bindata/qe/bindata.go || ret=$? + if [ $ret -ne 0 ]; then + echo "bindata is not correct updated by your PR, please refer to the following and re-execute \"make bindata\" on your terminal and then update PR" + echo "---" + git diff pkg/bindata/qe/bindata.go || true + echo "---" + exit 1 + fi + container: + from: src + run_if_changed: ^(openshift/tests-extension/test/qe/testdata/) - as: e2e-gcp-ovn-upgrade steps: cluster_profile: gcp diff --git a/ci-operator/jobs/openshift/operator-framework-olm/openshift-operator-framework-olm-main-presubmits.yaml b/ci-operator/jobs/openshift/operator-framework-olm/openshift-operator-framework-olm-main-presubmits.yaml index 45434c3794bc5..fe1506940ae7a 100644 --- a/ci-operator/jobs/openshift/operator-framework-olm/openshift-operator-framework-olm-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/operator-framework-olm/openshift-operator-framework-olm-main-presubmits.yaml @@ -1,5 +1,59 @@ presubmits: openshift/operator-framework-olm: + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build08 + context: ci/prow/bindata-check + decorate: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-operator-framework-olm-main-bindata-check + rerun_command: /test bindata-check + run_if_changed: ^(tests-extension/test/qe/testdata/) + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=bindata-check + command: + - ci-operator + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )bindata-check,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/jobs/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main-presubmits.yaml b/ci-operator/jobs/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main-presubmits.yaml index 7c816e95ef954..2f1f024ef278f 100644 --- a/ci-operator/jobs/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/operator-framework-operator-controller/openshift-operator-framework-operator-controller-main-presubmits.yaml @@ -1,5 +1,59 @@ presubmits: openshift/operator-framework-operator-controller: + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build09 + context: ci/prow/bindata-check + decorate: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-operator-framework-operator-controller-main-bindata-check + rerun_command: /test bindata-check + run_if_changed: ^(openshift/tests-extension/test/qe/testdata/) + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=bindata-check + command: + - ci-operator + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )bindata-check,?($|\s.*) - agent: kubernetes always_run: true branches: