forked from openshift/release
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
step-registry: add Origin E2E test step
- Loading branch information
1 parent
4748256
commit a2fd8c3
Showing
7 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
12 changes: 12 additions & 0 deletions
12
ci-operator/step-registry/origin/e2e/origin-e2e-workflow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
73 changes: 73 additions & 0 deletions
73
ci-operator/step-registry/origin/e2e/test/origin-e2e-test-commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
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;; | ||
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 | ||
if [[ -e "${SHARED_DIR}/test-suite.txt" ]]; then | ||
test_suite=$(<"${SHARED_DIR}/test-suite.txt") | ||
fi | ||
|
||
openshift-tests run "${test_suite}" \ | ||
--provider "${TEST_PROVIDER}" \ | ||
-o /tmp/artifacts/e2e.log \ | ||
--junit-dir /tmp/artifacts/junit |
12 changes: 12 additions & 0 deletions
12
ci-operator/step-registry/origin/e2e/test/origin-e2e-test-ref.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ref: | ||
as: origin-e2e-test | ||
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. |