-
Notifications
You must be signed in to change notification settings - Fork 1.9k
step-registry: add Origin E2E test step #6965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
approvers: | ||
- smarterclayton | ||
- wking | ||
- stevekuznetsov | ||
- vrutkovs | ||
- abhinavdahiya | ||
- deads2k | ||
- crawford | ||
- ewolinetz | ||
- csrwng | ||
- staebler |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
approvers: | ||
- smarterclayton | ||
- wking | ||
- stevekuznetsov | ||
- vrutkovs | ||
- abhinavdahiya | ||
- deads2k | ||
- crawford | ||
- ewolinetz | ||
- csrwng | ||
- staebler |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
workflow: | ||
as: origin-e2e | ||
steps: | ||
pre: | ||
- ref: ipi-conf | ||
- chain: ipi-install | ||
test: | ||
- ref: origin-e2e-test | ||
post: | ||
- chain: ipi-deprovision | ||
documentation: |- | ||
The Origin E2E workflow executes the common end-to-end test suite. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
approvers: | ||
- smarterclayton | ||
- wking | ||
- stevekuznetsov | ||
- vrutkovs | ||
- abhinavdahiya | ||
- deads2k | ||
- crawford | ||
- ewolinetz | ||
- csrwng | ||
- staebler |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
cluster_profile=/var/run/secrets/ci.openshift.io/cluster-profile | ||
export AWS_SHARED_CREDENTIALS_FILE=${cluster_profile}/.awscred | ||
export AZURE_AUTH_LOCATION=${cluster_profile}/osServicePrincipal.json | ||
export GCP_SHARED_CREDENTIALS_FILE=${cluster_profile}/gce.json | ||
export HOME=/tmp/home | ||
export PATH=/usr/libexec/origin:$PATH | ||
|
||
trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
||
mkdir -p "${HOME}" | ||
|
||
# if the cluster profile included an insights secret, install it to the cluster to | ||
# report support data from the support-operator | ||
if [[ -f "${cluster_profile}/insights-live.yaml" ]]; then | ||
oc create -f "${cluster_profile}/insights-live.yaml" || true | ||
fi | ||
|
||
# set up cloud-provider-specific env vars | ||
KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding notes here so they're captured (as I'm reviewing the step registry) This is wrong, bastion is an optional requirement for some steps, not required for all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In fact, we should probably move all "SSH requiring" things out to their own step. It might even be appropriate for that always to be expecting the bastion. Will have to think about that. |
||
KUBE_SSH_KEY_PATH=${cluster_profile}/ssh-privatekey | ||
export KUBE_SSH_BASTION KUBE_SSH_KEY_PATH | ||
case "${CLUSTER_TYPE}" in | ||
gcp) | ||
export GOOGLE_APPLICATION_CREDENTIALS="${GCP_SHARED_CREDENTIALS_FILE}" | ||
export KUBE_SSH_USER=core | ||
mkdir -p ~/.ssh | ||
cp "${cluster_profile}/ssh-privatekey" ~/.ssh/google_compute_engine || true | ||
export TEST_PROVIDER='{"type":"gce","region":"us-east1","multizone": true,"multimaster":true,"projectid":"openshift-gce-devel-ci"}' | ||
;; | ||
aws) | ||
mkdir -p ~/.ssh | ||
cp "${cluster_profile}/ssh-privatekey" ~/.ssh/kube_aws_rsa || true | ||
export PROVIDER_ARGS="-provider=aws -gce-zone=us-east-1" | ||
# TODO: make openshift-tests auto-discover this from cluster config | ||
REGION="$(oc get -o jsonpath='{.status.platformStatus.aws.region}' infrastructure cluster)" | ||
ZONE="$(oc get -o jsonpath='{.items[0].metadata.labels.failure-domain\.beta\.kubernetes\.io/zone}' nodes)" | ||
export TEST_PROVIDER="{\"type\":\"aws\",\"region\":\"${REGION}\",\"zone\":\"${ZONE}\",\"multizone\":true,\"multimaster\":true}" | ||
export KUBE_SSH_USER=core | ||
;; | ||
azure4) export TEST_PROVIDER=azure;; | ||
*) echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'"; exit 1;; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is wrong, the test suite correctly infers platform starting from 4.3. Remove this line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests are also executed in 4.1 and 4.2. |
||
esac | ||
|
||
mkdir -p /tmp/output | ||
cd /tmp/output | ||
|
||
if [[ "${CLUSTER_TYPE}" == gcp ]]; then | ||
pushd /tmp | ||
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-256.0.0-linux-x86_64.tar.gz | ||
tar -xzf google-cloud-sdk-256.0.0-linux-x86_64.tar.gz | ||
export PATH=$PATH:/tmp/google-cloud-sdk/bin | ||
mkdir gcloudconfig | ||
export CLOUDSDK_CONFIG=/tmp/gcloudconfig | ||
gcloud auth activate-service-account --key-file="${GCP_SHARED_CREDENTIALS_FILE}" | ||
gcloud config set project openshift-gce-devel-ci | ||
popd | ||
fi | ||
|
||
test_suite=openshift/conformance/parallel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should always be injected from a variable, all "standard" suites should be parameterized by the test (possibly by the workflow, but either way, this is wrong). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're working on adding test/step parameters. |
||
if [[ -e "${SHARED_DIR}/test-suite.txt" ]]; then | ||
test_suite=$(<"${SHARED_DIR}/test-suite.txt") | ||
fi | ||
|
||
openshift-tests run "${test_suite}" \ | ||
--provider "${TEST_PROVIDER}" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be conditional based on whether TEST_PROVIDER is set. If TEST_PROVIDER was not set, this flag should not be set. |
||
-o /tmp/artifacts/e2e.log \ | ||
--junit-dir /tmp/artifacts/junit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ref: | ||
as: origin-e2e-test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll need to rename all these steps, this is not The name of our platform is |
||
from: stable:tests | ||
commands: origin-e2e-test-commands.sh | ||
resources: | ||
requests: | ||
cpu: "3" | ||
memory: 600Mi | ||
limits: | ||
memory: 4Gi | ||
documentation: |- | ||
The Origin E2E step executes the common end-to-end test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I don't really want to be in these -- I don't own the content. We're at the top-level anyway for approval