mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
feat: goreman option to exclude (#7080) Signed-off-by: pashavictorovich <pavel@codefresh.io>
37 lines
No EOL
814 B
Bash
37 lines
No EOL
814 B
Bash
#!/usr/bin/env bash
|
|
|
|
declare -a services=("controller" "api-server" "redis" "repo-server" "ui")
|
|
|
|
EXCLUDE=$exclude
|
|
|
|
declare -a servicesToRun=()
|
|
|
|
if [ "$EXCLUDE" != "" ]; then
|
|
# Parse services list by ',' character
|
|
servicesToExclude=($(echo "$EXCLUDE" | tr ',' '\n'))
|
|
|
|
# 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
|
|
servicesToRun+=($element)
|
|
fi
|
|
done
|
|
fi
|
|
|
|
command="goreman start "
|
|
|
|
for element in "${servicesToRun[@]}"
|
|
do
|
|
command+=$element
|
|
command+=" "
|
|
done
|
|
|
|
eval $command |