Skip to content

Commit

Permalink
Happy Path: Use chectl auth:login flow in PR checks
Browse files Browse the repository at this point in the history
This is needed because of che-incubator/chectl#910

Signed-off-by: Radim Hopp <rhopp@redhat.com>
  • Loading branch information
rhopp committed Oct 22, 2020
1 parent d26f3d9 commit bd071ff
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/.infra/crw-ci/pr-check/k8s/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}
Expand Down

0 comments on commit bd071ff

Please sign in to comment.