2021-08-25 19:40:55 +00:00
#!/usr/bin/env bash
2025-07-14 13:01:33 +00:00
declare -a services = ( "controller" "api-server" "redis" "repo-server" "cmp-server" "ui" "applicationset-controller" "commit-server" "notification" "dex" "git-server" "helm-registry" "dev-mounter" )
2021-08-25 19:40:55 +00:00
2025-07-18 11:38:27 +00:00
EXCLUDE = " $exclude "
2021-08-25 19:40:55 +00:00
declare -a servicesToRun = ( )
if [ " $EXCLUDE " != "" ] ; then
2025-07-18 11:38:27 +00:00
# Split services list by ',' character
readarray -t servicesToExclude < <( tr ',' '\n' <<< " $EXCLUDE " )
2021-08-25 19:40:55 +00:00
# Find subset of items from services array that not include servicesToExclude items
for element in " ${ services [@] } "
do
found = false
for excludedSvc in " ${ servicesToExclude [@] } "
do
if [ [ " $excludedSvc " = = " $element " ] ] ; then
found = true
fi
done
if [ [ " $found " = = false ] ] ; then
2025-07-18 11:38:27 +00:00
servicesToRun += ( " $element " )
2021-08-25 19:40:55 +00:00
fi
done
fi
2025-07-18 11:38:27 +00:00
command = ( "goreman" "start" )
2021-08-25 19:40:55 +00:00
for element in " ${ servicesToRun [@] } "
do
2025-07-18 11:38:27 +00:00
command += ( " $element " )
2021-08-25 19:40:55 +00:00
done
2025-07-18 11:38:27 +00:00
" ${ command [@] } "