From bd071ffa842b0b7a4c71e961d375b0004984aba3 Mon Sep 17 00:00:00 2001 From: Radim Hopp Date: Thu, 22 Oct 2020 16:47:37 +0200 Subject: [PATCH] Happy Path: Use `chectl auth:login` flow in PR checks This is needed because of https://github.com/che-incubator/chectl/pull/910 Signed-off-by: Radim Hopp --- tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile b/tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile index 20541a53b4fe..1ad26e59bb7c 100644 --- a/tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile +++ b/tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile @@ -324,17 +324,11 @@ EOL""" ).trim() } - sh """ - USER_ACCESS_TOKEN=\$(curl -k -X POST https://${KEYCLOAK_BASE_URL}/auth/realms/che/protocol/openid-connect/token \\ - -H "Content-Type: application/x-www-form-urlencoded" \\ - -d "username=admin" \\ - -d "password=admin" \\ - -d "grant_type=password" \\ - -d "client_id=che-public" | jq -r .access_token) - + sh """ + ${pathToChectl} auth:login -u admin -p admin --chenamespace=eclipse-che + ${pathToChectl} workspace:create --start \\ --devfile=${DEVFILE_PATH} \\ - --access-token "\$USER_ACCESS_TOKEN" \\ --chenamespace=eclipse-che """ }