Skip to content

Commit

Permalink
read registry url before changing user
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Svydenko <[email protected]>
  • Loading branch information
svor committed Sep 27, 2023
1 parent eb13814 commit 33c5571
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .ci/openshift-ci/common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ forwardPortToService() {
sleep 3s
}

getPluginRegistryURL() {
PLUGIN_REGISTRY_URL=$(oc get checlusters.org.eclipse.che -n "${CHE_NAMESPACE}" "${CHE_NAMESPACE}" -o=jsonpath='{.status.pluginRegistryURL}')
echo "[INFO] Plugin registry URL: ${PLUGIN_REGISTRY_URL}"
}

killProcessByPort() {
fuser -k ${CHE_FORWARDED_PORT}/tcp
}
Expand Down Expand Up @@ -130,9 +135,6 @@ runTestWorkspaceWithGitRepoUrlAndCustomEditor() {
OCP_USER_NAMESPACE=$4
EDITOR_ID=$5

PLUGIN_REGISTRY_URL=$(oc get checlusters.org.eclipse.che -n "${CHE_NAMESPACE}" "${CHE_NAMESPACE}" -o=jsonpath='{.status.pluginRegistryURL}')
echo "[INFO] Plugin registry URL: ${PLUGIN_REGISTRY_URL}"

EDITOR_URL=$PLUGIN_REGISTRY_URL/plugins/$EDITOR_ID/devfile.yaml

oc project "${OCP_USER_NAMESPACE}"
Expand Down Expand Up @@ -201,5 +203,6 @@ setupTestEnvironment() {
createCustomResourcesFile
deployChe
forwardPortToService
getPluginRegistryURL
initUserNamespace "${OCP_USER_NAME}"
}
2 changes: 1 addition & 1 deletion .ci/openshift-ci/devworkspace-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
origin: git-repo-url
contributions:
- name: che-code
uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
uri: edior-uri
components:
- name: che-code-runtime-description
container:
Expand Down

0 comments on commit 33c5571

Please sign in to comment.