Skip to content
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

fix: Use up-to-date project for devworkspace happy path test #1053

Merged
merged 3 commits into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .ci/oci-devworkspace-happy-path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -u

export OPERATOR_REPO=$(dirname $(dirname $(readlink -f "$0")));
export HAPPY_PATH_POD_NAME=happy-path-che
export HAPPY_PATH_DEVFILE='https://gist.githubusercontent.com/l0rd/71a04dd0d8c8e921b16ba2690f7d5a47/raw/d520086e148c359b18c229328824dfefcf85e5ef/spring-petclinic-devfile-v2.0.0.yaml'
export HAPPY_PATH_TEST_PROJECT='https://github.com/che-samples/java-spring-petclinic/tree/devfilev2'
source "${OPERATOR_REPO}"/.github/bin/common.sh
source "${OPERATOR_REPO}"/.github/bin/oauth-provision.sh

Expand Down Expand Up @@ -46,10 +46,13 @@ function bumpPodsInfo() {
}

function Catch_Finish() {
# grab devworkspace-controller namespace events after running e2e
bumpPodsInfo "eclipse-che"
bumpPodsInfo "devworkspace-controller"
bumpPodsInfo "admin-che"
oc get devworkspaces -n "admin-che" -o=yaml > $ARTIFACTS_DIR/devworkspaces.yaml
bumpPodsInfo "user-che"
# bump DW related CRs but do not fail when CRDs are not created yet
oc get devworkspace -n "user-che" -o=yaml > $ARTIFACTS_DIR/devworkspaces.yaml || true
oc get devworkspacetemplate -n "user-che" -o=yaml > $ARTIFACTS_DIR/devworkspace-templates.yaml || true
oc get devworkspacerouting -n "user-che" -o=yaml > $ARTIFACTS_DIR/devworkspace-routings.yaml || true

collectLogs
}
Expand All @@ -63,8 +66,6 @@ overrideDefaults() {
deployChe() {
cat > /tmp/che-cr-patch.yaml <<EOL
spec:
devWorkspace:
enable: true
server:
customCheProperties:
CHE_FACTORY_DEFAULT__PLUGINS: ""
Expand All @@ -82,13 +83,14 @@ EOL
--templates=${TEMPLATES} \
--telemetry=off \
--installer=operator \
--workspace-engine=dev-workspace \
--che-operator-image=${OPERATOR_IMAGE}
}

startHappyPathTest() {
# patch pod-che-happy-path.yaml
ECLIPSE_CHE_URL=http://$(oc get route -n "${NAMESPACE}" che -o jsonpath='{.status.ingress[0].host}')
TS_SELENIUM_DEVWORKSPACE_URL="${ECLIPSE_CHE_URL}/#${HAPPY_PATH_DEVFILE}"
TS_SELENIUM_DEVWORKSPACE_URL="${ECLIPSE_CHE_URL}/#${HAPPY_PATH_TEST_PROJECT}"

curl https://raw.githubusercontent.com/eclipse/che/main/tests/.infra/openshift-ci/pod-che-happy-path.yaml > /tmp/pod-che-happy-path.yaml
sed -i "s@CHE_URL@${ECLIPSE_CHE_URL}@g" /tmp/pod-che-happy-path.yaml
Expand Down