From 1589dd3b9ca24799a99b9b4f856498d1df33ce07 Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Wed, 19 May 2021 08:41:00 +0200 Subject: [PATCH] Fixes minors Signed-off-by: Flavius Lacatusu --- .ci/oci-devworkspace-happy-path.sh | 3 +++ .ci/{oci-nightly-olm.sh => oci-multi-host.sh} | 1 + .ci/oci-single-host.sh | 12 ++++++++++++ .github/bin/common.sh | 12 ++++++++++-- 4 files changed, 26 insertions(+), 2 deletions(-) rename .ci/{oci-nightly-olm.sh => oci-multi-host.sh} (99%) diff --git a/.ci/oci-devworkspace-happy-path.sh b/.ci/oci-devworkspace-happy-path.sh index 55d900524..4fbf6e086 100755 --- a/.ci/oci-devworkspace-happy-path.sh +++ b/.ci/oci-devworkspace-happy-path.sh @@ -29,6 +29,8 @@ function bumpPodsInfo() { TARGET_DIR="${ARTIFACTS_DIR}/${NS}-info" mkdir -p "$TARGET_DIR" + oc get pods -n ${NS} + for POD in $(oc get pods -o name -n ${NS}); do for CONTAINER in $(oc get -n ${NS} ${POD} -o jsonpath="{.spec.containers[*].name}"); do echo "" @@ -46,6 +48,7 @@ function bumpPodsInfo() { function Catch_Finish() { # grab devworkspace-controller namespace events after running e2e bumpPodsInfo "devworkspace-controller" + bumpPodsInfo "devworkspace-che" bumpPodsInfo "admin-che" oc get devworkspaces -n "admin-che" -o=yaml > $ARTIFACTS_DIR/devworkspaces.yaml diff --git a/.ci/oci-nightly-olm.sh b/.ci/oci-multi-host.sh similarity index 99% rename from .ci/oci-nightly-olm.sh rename to .ci/oci-multi-host.sh index edfa5cf26..54ab02a0a 100755 --- a/.ci/oci-nightly-olm.sh +++ b/.ci/oci-multi-host.sh @@ -51,6 +51,7 @@ runTests() { sleep 10s createWorkspaceDevWorkspaceCheOperator waitWorkspaceStartedDevWorkspaceController + } initDefaults diff --git a/.ci/oci-single-host.sh b/.ci/oci-single-host.sh index f052f3917..59be8fa44 100755 --- a/.ci/oci-single-host.sh +++ b/.ci/oci-single-host.sh @@ -40,6 +40,18 @@ runTests() { provisionOAuth startNewWorkspace waitWorkspaceStart + + # Dev Workspace controller tests + deployDevWorkspaceController + waitDevWorkspaceControllerStarted + + sleep 10s + createWorkspaceDevWorkspaceController + waitWorkspaceStartedDevWorkspaceController + + sleep 10s + createWorkspaceDevWorkspaceCheOperator + waitWorkspaceStartedDevWorkspaceController } initDefaults diff --git a/.github/bin/common.sh b/.github/bin/common.sh index 8cfc52640..6c3d11777 100755 --- a/.github/bin/common.sh +++ b/.github/bin/common.sh @@ -160,7 +160,7 @@ deployEclipseCheStable(){ --installer ${installer} \ --chenamespace ${NAMESPACE} \ --skip-kubernetes-health-check \ - --che-operator-cr-yaml ${CR_PATCH_PATH} + --che-operator-cr-patch-yaml ${CR_PATCH_PATH} \ --version=${version} } @@ -401,7 +401,15 @@ waitDevWorkspaceControllerStarted() { } createWorkspaceDevWorkspaceController () { - oc apply -f https://raw.githubusercontent.com/devfile/devworkspace-operator/main/samples/flattened_theia-next.yaml -n ${NAMESPACE} + echo -e "[INFO] Waiting for webhook-server to be running" + CURRENT_TIME=$(date +%s) + ENDTIME=$(($CURRENT_TIME + 180)) + while [ $(date +%s) -lt $ENDTIME ]; do + if oc apply -f https://raw.githubusercontent.com/che-incubator/devworkspace-che-operator/main/samples/flattened_theia-nodejs.yaml -n ${NAMESPACE}; then + break + fi + sleep 10 + done } waitWorkspaceStartedDevWorkspaceController() {