From 8e38b771a0a439c7c43a6f5d9a4e6ae83d0c5cdd Mon Sep 17 00:00:00 2001 From: Flavius Lacatusu Date: Tue, 13 Jul 2021 16:07:50 +0200 Subject: [PATCH] fix: Start workspace with devfilev2 when devworkspace is enabled Signed-off-by: Flavius Lacatusu --- .ci/cico_updates_openshift.sh | 3 ++- .ci/oci-multi-host.sh | 6 +++++- .ci/oci-single-host.sh | 6 +++++- .github/bin/common.sh | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.ci/cico_updates_openshift.sh b/.ci/cico_updates_openshift.sh index 56e77d46e5..8f322688af 100755 --- a/.ci/cico_updates_openshift.sh +++ b/.ci/cico_updates_openshift.sh @@ -21,7 +21,6 @@ source "${OPERATOR_REPO}"/.github/bin/oauth-provision.sh trap "catchFinish" EXIT SIGINT overrideDefaults() { - export DEV_WORKSPACE_ENABLE="true" export CHE_EXPOSURE_STRATEGY="single-host" } @@ -33,7 +32,9 @@ runTests() { waitWorkspaceStart # Dev Workspace controller tests + enableDevWorkspaceEngine waitDevWorkspaceControllerStarted + waitEclipseCheDeployed ${LAST_PACKAGE_VERSION} sleep 10s createWorkspaceDevWorkspaceController diff --git a/.ci/oci-multi-host.sh b/.ci/oci-multi-host.sh index 64eafdb448..5c92ac7dcb 100755 --- a/.ci/oci-multi-host.sh +++ b/.ci/oci-multi-host.sh @@ -31,10 +31,12 @@ overrideDefaults() { # CI_CHE_OPERATOR_IMAGE it is che operator image builded in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates export OPERATOR_IMAGE=${CI_CHE_OPERATOR_IMAGE} export CHE_EXPOSURE_STRATEGY="multi-host" - export DEV_WORKSPACE_ENABLE="true" } runTests() { + # create namespace + oc create namespace eclipse-che || true + # Deploy Eclipse Che applying CR applyOlmCR waitEclipseCheDeployed "next" @@ -43,7 +45,9 @@ runTests() { waitWorkspaceStart # Dev Workspace controller tests + enableDevWorkspaceEngine waitDevWorkspaceControllerStarted + waitEclipseCheDeployed "next" sleep 10s createWorkspaceDevWorkspaceController diff --git a/.ci/oci-single-host.sh b/.ci/oci-single-host.sh index a2bab0730d..96a2ef1626 100755 --- a/.ci/oci-single-host.sh +++ b/.ci/oci-single-host.sh @@ -31,10 +31,12 @@ overrideDefaults() { # CI_CHE_OPERATOR_IMAGE it is che operator image builded in openshift CI job workflow. More info about how works image dependencies in ci:https://github.com/openshift/ci-tools/blob/master/TEMPLATES.md#parameters-available-to-templates export OPERATOR_IMAGE=${CI_CHE_OPERATOR_IMAGE} export CHE_EXPOSURE_STRATEGY="single-host" - export DEV_WORKSPACE_ENABLE="true" } runTests() { + # create namespace + oc create namespace eclipse-che || true + # Deploy Eclipse Che applying CR applyOlmCR waitEclipseCheDeployed "next" @@ -43,7 +45,9 @@ runTests() { waitWorkspaceStart # Dev Workspace controller tests + enableDevWorkspaceEngine waitDevWorkspaceControllerStarted + waitEclipseCheDeployed "next" sleep 10s createWorkspaceDevWorkspaceController diff --git a/.github/bin/common.sh b/.github/bin/common.sh index e980b3ac1f..8c6a7118d3 100755 --- a/.github/bin/common.sh +++ b/.github/bin/common.sh @@ -477,3 +477,7 @@ waitWorkspaceStartedDevWorkspaceController() { createWorkspaceDevWorkspaceCheOperator() { oc apply -f https://raw.githubusercontent.com/che-incubator/devworkspace-che-operator/main/samples/flattened_theia-nodejs.yaml -n ${NAMESPACE} } + +enableDevWorkspaceEngine() { + kubectl patch checluster/eclipse-che -n ${NAMESPACE} --type=merge -p '{"spec":{"devWorkspace":{"enable": true}}}' +}