From 6c932e62d4614e2409cf0165b6da6fbb0d35e8f1 Mon Sep 17 00:00:00 2001 From: Ronny Baturov Date: Mon, 4 Nov 2024 14:25:31 +0200 Subject: [PATCH] Added NROP upgrade test Signed-off-by: Ronny Baturov --- ...shift-kni-numaresources-operator-main.yaml | 24 ++++++ ...umaresources-operator-main-presubmits.yaml | 75 +++++++++++++++++++ ci-operator/step-registry/telco5g/nrop/OWNERS | 6 ++ .../step-registry/telco5g/nrop/install/OWNERS | 6 ++ .../install/telco5g-nrop-install-commands.sh | 5 ++ .../telco5g-nrop-install-ref.metadata.json | 12 +++ .../install/telco5g-nrop-install-ref.yaml | 12 +++ .../step-registry/telco5g/nrop/upgrade/OWNERS | 6 ++ .../upgrade/telco5g-nrop-upgrade-commands.sh | 4 + .../telco5g-nrop-upgrade-ref.metadata.json | 12 +++ .../upgrade/telco5g-nrop-upgrade-ref.yaml | 12 +++ 11 files changed, 174 insertions(+) create mode 100644 ci-operator/step-registry/telco5g/nrop/OWNERS create mode 100644 ci-operator/step-registry/telco5g/nrop/install/OWNERS create mode 100644 ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-commands.sh create mode 100644 ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.metadata.json create mode 100644 ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.yaml create mode 100644 ci-operator/step-registry/telco5g/nrop/upgrade/OWNERS create mode 100644 ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-commands.sh create mode 100644 ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.metadata.json create mode 100644 ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.yaml diff --git a/ci-operator/config/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main.yaml b/ci-operator/config/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main.yaml index e13911234ffe..19cdf875d0f4 100644 --- a/ci-operator/config/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main.yaml +++ b/ci-operator/config/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main.yaml @@ -3,6 +3,10 @@ base_images: name: cli-operator-sdk namespace: ocp tag: v1.31.0 + numaresources-operator-bundle-4.17: + name: numaresources-operator-4.17 + namespace: ocp-kni + tag: numaresources-operator-bundle operator-sdk: name: "4.17" namespace: origin @@ -183,6 +187,26 @@ tests: env: PROJECT_NAME: numaresources-operator workflow: openshift-ci-security +- as: e2e-operator-upgrade + steps: + cluster_profile: aws-telco + dependencies: + OO_BUNDLE: numaresources-operator-bundle + OO_BUNDLE_OLD: numaresources-operator-bundle-4.17 + env: + BASE_DOMAIN: telco5g-ci.devcluster.openshift.com + test: + - ref: telco5g-nrop-install + - ref: telco5g-nrop-upgrade + - as: e2e-test + cli: latest + commands: make test-e2e + from: src + resources: + requests: + cpu: 500m + memory: 1Gi + workflow: ipi-aws zz_generated_metadata: branch: main org: openshift-kni diff --git a/ci-operator/jobs/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main-presubmits.yaml b/ci-operator/jobs/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main-presubmits.yaml index be5acb5c32dc..8b402ff4ae19 100644 --- a/ci-operator/jobs/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main-presubmits.yaml +++ b/ci-operator/jobs/openshift-kni/numaresources-operator/openshift-kni-numaresources-operator-main-presubmits.yaml @@ -337,6 +337,81 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )ci-unit,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build05 + context: ci/prow/e2e-operator-upgrade + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-telco + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-kni-numaresources-operator-main-e2e-operator-upgrade + rerun_command: /test e2e-operator-upgrade + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-operator-upgrade + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - 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: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - 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( | .* )e2e-operator-upgrade,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/ci-operator/step-registry/telco5g/nrop/OWNERS b/ci-operator/step-registry/telco5g/nrop/OWNERS new file mode 100644 index 000000000000..f8c8cf2cb22c --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/OWNERS @@ -0,0 +1,6 @@ +approvers: +- ffromani +- shajmakh +- swatisehgal +- Tal-or +- yanirq \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/install/OWNERS b/ci-operator/step-registry/telco5g/nrop/install/OWNERS new file mode 100644 index 000000000000..f8c8cf2cb22c --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/install/OWNERS @@ -0,0 +1,6 @@ +approvers: +- ffromani +- shajmakh +- swatisehgal +- Tal-or +- yanirq \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-commands.sh b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-commands.sh new file mode 100644 index 000000000000..b978c71ba57b --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-commands.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +oc create namespace numaresources-operator +operator-sdk run bundle -n numaresources-operator --security-context-config restricted "$OO_BUNDLE_OLD" +oc wait --for condition=Available -n numaresources-operator deployment numaresources-controller-manager \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.metadata.json b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.metadata.json new file mode 100644 index 000000000000..d490d27dfe6d --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "telco5g/nrop/install/telco5g-nrop-install-ref.yaml", + "owners": { + "approvers": [ + "ffromani", + "shajmakh", + "swatisehgal", + "Tal-or", + "yanirq" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.yaml b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.yaml new file mode 100644 index 000000000000..2fb2bf75cc9e --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/install/telco5g-nrop-install-ref.yaml @@ -0,0 +1,12 @@ +ref: + as: telco5g-nrop-install + cli: latest + commands: telco5g-nrop-install-commands.sh + dependencies: + - env: OO_BUNDLE_OLD + name: ${OO_BUNDLE_OLD} + from: operator-sdk + resources: + requests: + cpu: 1000m + memory: 500Mi diff --git a/ci-operator/step-registry/telco5g/nrop/upgrade/OWNERS b/ci-operator/step-registry/telco5g/nrop/upgrade/OWNERS new file mode 100644 index 000000000000..f8c8cf2cb22c --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/upgrade/OWNERS @@ -0,0 +1,6 @@ +approvers: +- ffromani +- shajmakh +- swatisehgal +- Tal-or +- yanirq \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-commands.sh b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-commands.sh new file mode 100644 index 000000000000..eb18cb94b997 --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-commands.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +operator-sdk run bundle-upgrade --timeout=10m --security-context-config restricted -n numaresources-operator "$OO_BUNDLE" +oc wait --for condition=Available -n numaresources-operator deployment numaresources-controller-manager \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.metadata.json b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.metadata.json new file mode 100644 index 000000000000..d06e3869f191 --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.yaml", + "owners": { + "approvers": [ + "ffromani", + "shajmakh", + "swatisehgal", + "Tal-or", + "yanirq" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.yaml b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.yaml new file mode 100644 index 000000000000..3b4fb97f460f --- /dev/null +++ b/ci-operator/step-registry/telco5g/nrop/upgrade/telco5g-nrop-upgrade-ref.yaml @@ -0,0 +1,12 @@ +ref: + as: telco5g-nrop-upgrade + cli: latest + commands: telco5g-nrop-upgrade-commands.sh + dependencies: + - env: OO_BUNDLE + name: ${OO_BUNDLE} + from: operator-sdk + resources: + requests: + cpu: 1000m + memory: 500Mi