Skip to content

Commit 8d80e59

Browse files
author
Chris Wiechmann
committed
Update entrypoint.sh
1 parent 2dd64e8 commit 8d80e59

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

entrypoint.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -x
32

43
CLI=/apim-cli-1.5.1/scripts/apim.sh
54

@@ -9,9 +8,10 @@ apimCLIArgs="-h ${INPUT_APIMHOSTNAME} -u ${INPUT_APIMUSERNAME} -p ${INPUT_APIMPA
98
if ! [ -z ${INPUT_USERDIRECTORY} ];then
109
echo "Importing users from directory: '${INPUT_USERDIRECTORY}'"
1110
cd ${INPUT_USERDIRECTORY} || exit 99;
11+
echo "Import all Users from the following directories containing a file user-config.json:"
12+
ls -1
1213
for userDirectory in `find . -mindepth 1 -type d`
1314
do
14-
echo "Import user from config: $userDirectory"
1515
$CLI user import ${apimCLIArgs} -c ${userDirectory}/user-config.json
1616
done
1717
fi
@@ -20,9 +20,10 @@ fi
2020
if ! [ -z ${INPUT_ORGDIRECTORY} ];then
2121
echo "Importing organizations from directory: '${INPUT_ORGDIRECTORY}'"
2222
cd ${INPUT_ORGDIRECTORY} || exit 99;
23+
echo "Import all Organization from the following directories containing a file org-config.json:"
24+
ls -1
2325
for orgDirectory in `find . -mindepth 1 -type d`
2426
do
25-
echo "Import organization from config: $orgDirectory"
2627
$CLI org import ${apimCLIArgs} -c ${orgDirectory}/org-config.json
2728
done
2829
fi
@@ -31,9 +32,10 @@ fi
3132
if ! [ -z ${INPUT_APPDIRECTORY} ];then
3233
echo "Importing applications from directory: '${INPUT_APPDIRECTORY}'"
3334
cd ${INPUT_APPDIRECTORY} || exit 99;
35+
echo "Import all Applications from the following directories containing a file application-config.json:"
36+
ls -1
3437
for appDirectory in `find . -mindepth 1 -type d`
3538
do
36-
echo "Import applicaton from config directory: $appDirectory"
3739
$CLI app import ${apimCLIArgs} -c ${appDirectory}/application-config.json
3840
done
3941
fi
@@ -42,9 +44,10 @@ fi
4244
if ! [ -z ${INPUT_APIDIRECTORY} ];then
4345
echo "Importing APIs from directory: '${INPUT_APIDIRECTORY}'"
4446
cd ${INPUT_APIDIRECTORY} || exit 99;
47+
echo "Import all APIs from the following directories containing a file api-config.json:"
48+
ls -1
4549
for apiDirectory in `find . -mindepth 1 -type d`
4650
do
47-
echo "Import API from config directory: $apiDirectory"
4851
$CLI api import ${apimCLIArgs} -c ${apiDirectory}/api-config.json -force
4952
done
5053
fi

0 commit comments

Comments
 (0)