Skip to content

Commit

Permalink
openshift/installer: add IaaS-agnostic E2E test
Browse files Browse the repository at this point in the history
  • Loading branch information
bbguimaraes committed Jun 24, 2019
1 parent f5ed31a commit ca464ed
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit ca464ed

Please sign in to comment.