From 381c33bdad7381841e8f1a9bbadc0251ed57e26b Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Fri, 5 Oct 2018 13:37:48 +0200 Subject: [PATCH] Add an e2e-openstack job --- .../installer/openshift-installer-master.yaml | 5 ++ ...openshift-installer-master-presubmits.yaml | 58 +++++++++++++++++++ .../cluster-launch-installer-e2e.yaml | 17 +++++- 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/ci-operator/config/openshift/installer/openshift-installer-master.yaml b/ci-operator/config/openshift/installer/openshift-installer-master.yaml index 10c9d7934fd40..93734161282dc 100644 --- a/ci-operator/config/openshift/installer/openshift-installer-master.yaml +++ b/ci-operator/config/openshift/installer/openshift-installer-master.yaml @@ -67,3 +67,8 @@ tests: run-tests openshift_installer: cluster_profile: aws +- as: e2e-openstack + commands: TEST_FOCUS='Secrets should be consumable from pods in volume with defaultMode + set' run-tests + openshift_installer: + cluster_profile: openstack 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 09d01ac3a4ccb..92a91652e1694 100644 --- a/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml @@ -117,6 +117,64 @@ presubmits: name: prow-job-cluster-launch-installer-e2e name: job-definition trigger: ((?m)^/test( all| e2e-aws-all),?(\s+|$)) + - agent: kubernetes + always_run: false + branches: + - master + context: ci/prow/e2e-openstack + decorate: true + name: pull-ci-openshift-installer-master-e2e-openstack + optional: true + rerun_command: /test e2e-openstack + skip_cloning: true + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/e2e-openstack-cluster-profile + - --target=e2e-openstack + - --template=/usr/local/e2e-openstack + command: + - ci-operator + env: + - name: CLUSTER_TYPE + value: openstack + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: openshift-installer-master.yaml + name: ci-operator-configs + - name: JOB_NAME_SAFE + value: e2e-openstack + - name: TEST_COMMAND + value: TEST_FOCUS='Secrets should be consumable from pods in volume with + defaultMode set' run-tests + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + limits: + cpu: 500m + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/e2e-openstack-cluster-profile + name: cluster-profile + - mountPath: /usr/local/e2e-openstack + name: job-definition + subPath: cluster-launch-installer-e2e.yaml + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-openstack + - configMap: + name: prow-job-cluster-launch-installer-e2e + name: job-definition + trigger: ((?m)^/test( all| e2e-openstack),?(\s+|$)) - agent: kubernetes always_run: true 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 0d62e4b3ee2cc..e10aaddcc47d7 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml @@ -171,6 +171,9 @@ objects: export PROVIDER_ARGS="-provider=aws -gce-zone=us-east-1" mkdir -p ~/.ssh cp /tmp/cluster/ssh-privatekey ~/.ssh/kube_aws_rsa || true + elif [[ "${CLUSTER_TYPE}" == "openstack" ]]; then + mkdir -p ~/.ssh + cp /tmp/cluster/ssh-privatekey ~/.ssh/kube_openstack_rsa || true fi mkdir -p /tmp/output @@ -234,11 +237,23 @@ objects: - name: OPENSHIFT_INSTALL_PULL_SECRET_PATH value: /etc/openshift-installer/pull-secret - name: OPENSHIFT_INSTALL_PLATFORM - value: aws + value: ${CLUSTER_TYPE} - name: OPENSHIFT_INSTALL_AWS_REGION value: us-east-1 - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE value: ${RELEASE_IMAGE_LATEST} + - name: OPENSHIFT_INSTALL_OPENSTACK_IMAGE + value: rhcos + - name: OPENSHIFT_INSTALL_OPENSTACK_CLOUD + value: openstack-cloud + - name: OPENSHIFT_INSTALL_OPENSTACK_REGION + value: RegionOne + - name: OPENSHIFT_INSTALL_OPENSTACK_EXTERNAL_NETWORK + value: public + - name: OS_CLOUD + value: openstack-cloud + - name: OS_CLIENT_CONFIG_FILE + value: /etc/openshift-installer/clouds.yaml command: - /bin/sh - -c