mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
feat: goreman option to exclude (#7080)
feat: goreman option to exclude (#7080) Signed-off-by: pashavictorovich <pavel@codefresh.io>
This commit is contained in:
parent
49a854a738
commit
ae803a2f1e
2 changed files with 43 additions and 0 deletions
6
Makefile
6
Makefile
|
|
@ -451,6 +451,12 @@ start-local: mod-vendor-local dep-ui-local
|
|||
ARGOCD_E2E_TEST=false \
|
||||
goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START}
|
||||
|
||||
# Run goreman start with exclude option , provide exclude env variable with list of services
|
||||
.PHONY: run
|
||||
run:
|
||||
bash ./hack/goreman-start.sh
|
||||
|
||||
|
||||
# Runs pre-commit validation with the virtualized toolchain
|
||||
.PHONY: pre-commit
|
||||
pre-commit: codegen build lint test
|
||||
|
|
|
|||
37
hack/goreman-start.sh
Normal file
37
hack/goreman-start.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/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
|
||||
Loading…
Reference in a new issue