diff --git a/ci-operator/config/openshift/installer/openshift-installer-master.yaml b/ci-operator/config/openshift/installer/openshift-installer-master.yaml index 322eb653e7d55..a270836466b2c 100644 --- a/ci-operator/config/openshift/installer/openshift-installer-master.yaml +++ b/ci-operator/config/openshift/installer/openshift-installer-master.yaml @@ -164,3 +164,6 @@ tests: commands: TEST_SUITE=openshift/conformance/parallel run-tests openshift_installer_upi: cluster_profile: vsphere +- as: e2e + commands: TEST_SUITE=openshift/conformance/parallel run-tests + openshift_installer_random: {} diff --git a/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml b/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml index 8b116a82a308e..fa4be92787844 100644 --- a/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml @@ -1,5 +1,108 @@ presubmits: openshift/installer: + - agent: kubernetes + always_run: false + branches: + - master + context: ci/prow/e2e + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + name: pull-ci-openshift-installer-master-e2e + optional: true + rerun_command: /test e2e + spec: + containers: + - args: + - -c + - | + set -eux + target=$(awk < /usr/local/e2e-targets \ + --assign "r=$RANDOM" \ + 'BEGIN { r /= 32767 } (r -= $1) <= 0 { print $2; exit }') + case "$target" in + aws) template=e2e; CLUSTER_TYPE=aws;; + azure) template=e2e; CLUSTER_TYPE=azure4;; + aws-upi) template=upi-e2e; CLUSTER_TYPE=aws;; + vsphere) template=upi-e2e; CLUSTER_TYPE=vsphere;; + *) echo >&2 "invalid target $target"; exit 1 ;; + esac + ln -s "/usr/local/job-definition/cluster-launch-installer-$template.yaml" /tmp/e2e + ln -s "/usr/local/cluster-profiles/$CLUSTER_TYPE" /tmp/e2e-cluster-profile + export CLUSTER_TYPE + exec ci-operator \ + --artifact-dir=$(ARTIFACTS) \ + --give-pr-author-access-to-namespace=true \ + --secret-dir=/tmp/e2e-cluster-profile \ + --sentry-dsn-path=/etc/sentry-dsn/ci-operator \ + --target=e2e \ + --template=/tmp/e2e + command: + - bash + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-master.yaml + name: ci-operator-master-configs + - name: JOB_NAME_SAFE + value: e2e + - name: TEST_COMMAND + value: TEST_SUITE=openshift/conformance/parallel run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/cluster-profiles/aws + name: cluster-profile-aws + - mountPath: /usr/local/cluster-profiles/azure4 + name: cluster-profile-azure4 + - mountPath: /usr/local/cluster-profiles/vsphere + name: cluster-profile-vsphere + - mountPath: /usr/local/e2e-targets + name: e2e-targets + subPath: e2e-targets + - mountPath: /usr/local/job-definition + name: job-definition + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile-aws + projected: + sources: + - secret: + name: cluster-secrets-aws + - name: cluster-profile-azure4 + projected: + sources: + - secret: + name: cluster-secrets-azure4 + - name: cluster-profile-vsphere + projected: + sources: + - secret: + name: cluster-secrets-vsphere + - configMap: + name: e2e-targets + name: e2e-targets + - name: job-definition + projected: + sources: + - configMap: + name: prow-job-cluster-launch-installer-e2e + - configMap: + name: prow-job-cluster-launch-installer-upi-e2e + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )e2e,?($|\s.*) - agent: kubernetes always_run: false branches: