Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (5)
......@@ -12,6 +12,8 @@ This command can be used to set up a tenant in okapi. It requires several parame
* `--install-backend-module`: sets the backend-modules that sould be installed for the tenant. The value has to be the same as `svcId` when registering the service. To add multiple backend-modules, repeat the parameter.
* `--install-frontend-module`: sets the frontend-modules that sould be installed for the tenant. The value has to be the same as the installed version via yarn in the *stripes*-frontend. To add multiple frontend-modules, repeat the parameter.
* `--debug`: turns on debug-output
* `--loadReference`: trigger to load reference data on modules activation
* `--loadSample`: trigger to load sample data on modules activation. Implies to load reference data and automatically activates it.
## Images
......
......@@ -12,7 +12,8 @@ okapi_token=""
permission_id=""
permissions=""
module_descriptor=""
tenantParameters=""
loadSample=false
loadReference=false
parse_cmdline_parameters() {
! getopt --test >/dev/null
......@@ -22,7 +23,7 @@ parse_cmdline_parameters() {
fi
OPTIONS=
LONGOPTS=install-backend-module:,install-frontend-module:,name:,id:,description:,debug,loadSampleWithReference,loadReference
LONGOPTS=install-backend-module:,install-frontend-module:,name:,id:,description:,debug,loadSample,loadReference
! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
......@@ -60,12 +61,13 @@ parse_cmdline_parameters() {
debug=1
shift
;;
--loadSampleWithReference)
tenantParameters="tenantParameters=loadSample=true,loadReference=true"
--loadSample)
loadReference=true
loadSample=true
shift
;;
--loadReference)
tenantParameters="tenantParameters=loadReference=true"
loadReference=true
shift
;;
--)
......@@ -332,7 +334,7 @@ EOF
-w "|%{http_code}" \
-H 'Content-type: application/json' \
--connect-timeout ${CURL_CONNECT_TIMEOUT} \
"${OKAPI_URL}/_/proxy/tenants/${tenant_id}/install?${tenantParameters}" \
"${OKAPI_URL}/_/proxy/tenants/${tenant_id}/install?tenantParameters=loadSample=${loadSample},loadReference=${loadReference}" \
-d @- 2>&1`
case "${result##*|}" in
......@@ -566,7 +568,7 @@ get_permissions() {
-H "X-Okapi-Tenant: ${tenant_id}" \
-H "X-Okapi-Token: ${okapi_token}" \
--connect-timeout ${CURL_CONNECT_TIMEOUT} \
"${OKAPI_URL}/perms/permissions?query=visible%3D%3Dtrue&length=500" 2>&1`
"${OKAPI_URL}/perms/permissions?query=childOf%3D%3D%5B%5D&length=1000" 2>&1`
case "${result##*|}" in
200|201)
......