From eb814e25265b2c4649941d247f5bf666c4d1bfc4 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Thu, 2 Nov 2023 13:28:13 +0100 Subject: [PATCH] pr anmerkung --- goofy-client/apps/goofy-e2e/Jenkinsfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/goofy-client/apps/goofy-e2e/Jenkinsfile b/goofy-client/apps/goofy-e2e/Jenkinsfile index 595ca539a0..6cf3ad53c2 100644 --- a/goofy-client/apps/goofy-e2e/Jenkinsfile +++ b/goofy-client/apps/goofy-e2e/Jenkinsfile @@ -720,6 +720,14 @@ String getKeycloakUuid(realm, userName) { } } +String getKeycloakAccessToken(String realm) { + userManagerApiUserCredentials = getUserManagerApiUserCredentials(realm) + + def token = readJSON text: sh (script: "set +x && curl -d \"client_id=admin-cli\" -d \"username=${userManagerApiUserCredentials.user}\" -d \"password=${userManagerApiUserCredentials.password}\" -d \"grant_type=password\" https://$SSO_URL/realms/$realm/protocol/openid-connect/token", returnStdout: true) + + return token.access_token +} + Map getUserManagerApiUserCredentials(String namespace) { userManagerApiUserCredentials = readJSON ( text: sh (script: "kubectl get secret usermanagerapiuser-credentials -n ${namespace} -o jsonpath={.data}", returnStdout: true)) @@ -729,14 +737,6 @@ Map getUserManagerApiUserCredentials(String namespace) { ] } -String getKeycloakAccessToken(String realm) { - userManagerApiUserCredentials = getUserManagerApiUserCredentials(realm) - - def token = readJSON text: sh (script: "set +x && curl -d \"client_id=admin-cli\" -d \"username=${userManagerApiUserCredentials.user}\" -d \"password=${userManagerApiUserCredentials.password}\" -d \"grant_type=password\" https://$SSO_URL/realms/$realm/protocol/openid-connect/token", returnStdout: true) - - return token.access_token -} - Void sendFailureMessage() { def data = [ "msgtype": "m.text", -- GitLab