-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathentry-point.sh
executable file
·34 lines (27 loc) · 976 Bytes
/
entry-point.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
ENABLE_DEBUG=false
if [ "$PLUGIN_DEBUG" = "true" ] || [ "$PARAMETER_DEBUG" = "true" ]; then
ENABLE_DEBUG=true
fi
CONTINUE_ON_ERROR=true
if [ "$PLUGIN_CONTINUE_ON_ERROR" = "false" ] || [ "$PARAMETER_CONTINUE_ON_ERROR" = "false" ]; then
CONTINUE_ON_ERROR=false
fi
ALLOW_DUPLICATE_KEYS=false
if [ "$PLUGIN_ALLOW_DUPLICATE_KEYS" = "true" ] || [ "$PARAMETER_ALLOW_DUPLICATE_KEYS" = "true" ]; then
ALLOW_DUPLICATE_KEYS=true
fi
IGNORE_UNKNOWN_TAGS=true
if [ "$PLUGIN_IGNORE_UNKNOWN_TAGS" = "false" ] || [ "$PARAMETER_IGNORE_UNKNOWN_TAGS" = "false" ]; then
IGNORE_UNKNOWN_TAGS=false
fi
if [ ! -z "$PLUGIN_SEARCH_PATH" ]; then
SEARCH_PATH=$PLUGIN_SEARCH_PATH
elif [ ! -z "$PARAMETER_SEARCH_PATH" ]; then
SEARCH_PATH=$PARAMETER_SEARCH_PATH
fi
ALL_OPTS="--debug $ENABLE_DEBUG -c $CONTINUE_ON_ERROR -ad $ALLOW_DUPLICATE_KEYS -iu $IGNORE_UNKNOWN_TAGS"
if [ ! -z "$SEARCH_PATH" ]; then
ALL_OPTS="$ALL_OPTS -p $SEARCH_PATH"
fi
/scripts/yamlvalidator $ALL_OPTS