diff --git a/ci-operator/config/openshift/origin/openshift-origin-master.yaml b/ci-operator/config/openshift/origin/openshift-origin-master.yaml index 912f476f1e18e..94285158a6e23 100644 --- a/ci-operator/config/openshift/origin/openshift-origin-master.yaml +++ b/ci-operator/config/openshift/origin/openshift-origin-master.yaml @@ -300,3 +300,15 @@ tests: commands: sleep 7200 & wait openshift_installer_upi: cluster_profile: vsphere +- as: e2e-dr-snapshot-tests + commands: | + run-dr-snapshot-tests + TEST_SUITE=openshift/conformance/parallel run-tests + openshift_installer: + cluster_profile: aws +- as: e2e-dr-quorum-tests + commands: | + run-dr-quorum-tests + TEST_SUITE=openshift/conformance/parallel run-tests + openshift_installer: + cluster_profile: aws diff --git a/ci-operator/jobs/openshift/origin/openshift-origin-master-presubmits.yaml b/ci-operator/jobs/openshift/origin/openshift-origin-master-presubmits.yaml index 3d16837ebea68..a871452206461 100644 --- a/ci-operator/jobs/openshift/origin/openshift-origin-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/origin/openshift-origin-master-presubmits.yaml @@ -569,6 +569,140 @@ presubmits: name: prow-job-cluster-launch-installer-src name: job-definition trigger: (?m)^/test( | .* )e2e-conformance-k8s,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - master + context: ci/prow/e2e-dr-quorum-tests + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + name: pull-ci-openshift-origin-master-e2e-dr-quorum-tests + optional: true + rerun_command: /test e2e-dr-quorum-tests + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/e2e-dr-quorum-tests-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=e2e-dr-quorum-tests + - --template=/usr/local/e2e-dr-quorum-tests + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: aws + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-origin-master.yaml + name: ci-operator-master-configs + - name: JOB_NAME_SAFE + value: e2e-dr-quorum-tests + - name: TEST_COMMAND + value: | + run-dr-quorum-tests + TEST_SUITE=openshift/conformance/parallel run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/e2e-dr-quorum-tests-cluster-profile + name: cluster-profile + - mountPath: /usr/local/e2e-dr-quorum-tests + name: job-definition + subPath: cluster-launch-installer-e2e.yaml + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-aws + - configMap: + name: prow-job-cluster-launch-installer-e2e + name: job-definition + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )e2e-dr-quorum-tests,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - master + context: ci/prow/e2e-dr-snapshot-tests + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + name: pull-ci-openshift-origin-master-e2e-dr-snapshot-tests + optional: true + rerun_command: /test e2e-dr-snapshot-tests + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/e2e-dr-snapshot-tests-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=e2e-dr-snapshot-tests + - --template=/usr/local/e2e-dr-snapshot-tests + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: aws + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-origin-master.yaml + name: ci-operator-master-configs + - name: JOB_NAME_SAFE + value: e2e-dr-snapshot-tests + - name: TEST_COMMAND + value: | + run-dr-snapshot-tests + TEST_SUITE=openshift/conformance/parallel run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/e2e-dr-snapshot-tests-cluster-profile + name: cluster-profile + - mountPath: /usr/local/e2e-dr-snapshot-tests + name: job-definition + subPath: cluster-launch-installer-e2e.yaml + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-aws + - configMap: + name: prow-job-cluster-launch-installer-e2e + name: job-definition + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )e2e-dr-snapshot-tests,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml index aa815d835979e..c535c9563f49f 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml @@ -502,6 +502,18 @@ objects: sleep 60 } + function run-dr-snapshot-tests() { + openshift-tests run-dr restore-snapshot "${TEST_SUITE}" \ + --provider "${TEST_PROVIDER:-}" -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit + exit 0 + } + + function run-dr-quorum-tests() { + openshift-tests run-dr quorum-restore "${TEST_SUITE}" \ + --provider "${TEST_PROVIDER:-}" -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit + exit 0 + } + function run-upgrade-tests() { openshift-tests run-upgrade "${TEST_SUITE}" --to-image "${RELEASE_IMAGE_LATEST}" \ --provider "${TEST_PROVIDER:-}" -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit