Skip to content
Snippets Groups Projects
Commit db3d4fd9 authored by OZGCloud's avatar OZGCloud
Browse files

wait for keycloak client creation

parent 673e2d24
Branches
Tags
No related merge requests found
...@@ -365,6 +365,7 @@ Void startGoofy(String namespace, String values, String imageTag, String bezeich ...@@ -365,6 +365,7 @@ Void startGoofy(String namespace, String values, String imageTag, String bezeich
} }
} }
waitForKeycloakClientCreation(namespace)
createKeycloakGroups(namespace) createKeycloakGroups(namespace)
generateKeycloakUserYaml(namespace) generateKeycloakUserYaml(namespace)
applyKeycloakUser(namespace) applyKeycloakUser(namespace)
...@@ -543,3 +544,15 @@ String getKeycloakAccessToken() { ...@@ -543,3 +544,15 @@ String getKeycloakAccessToken() {
return token.access_token return token.access_token
} }
} }
Void waitForKeycloakClientCreation(realm) {
def shScript = """curl -H 'Content-Type: application/json' \
-H 'Authorization: bearer ${getKeycloakAccessToken()}' \
'https://sso.dev.ozg-sh.de/auth/admin/realms/${realm}/clients' \
| grep -q ${realm}-goofy
"""
while(sh(script: shScript, returnStatus: true)) {
sh 'sleep 5'
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment