Skip to content

Commit

Permalink
Added error handling to arguments for e2e-setup-cluster-reconciliatio…
Browse files Browse the repository at this point in the history
…n.sh
  • Loading branch information
devantler committed Jul 25, 2023
1 parent 094e176 commit aadc0e4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/scripts/e2e-setup-cluster-reconciliation.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
if [ -z "$1" ]
then
echo "Error: 'repository_url' argument not set"
exit 1
fi

if [ -z "$2" ]
then
echo "Error: 'branch_name' argument not set"
exit 1
fi

repository_url=$1
branch_name=$2

flux create source git flux-system \
--url=$repository_url \
--branch=$branch_name \
--ignore-paths="k8s/clusters/**/flux-system/" \
flux create kustomization flux-system \
--source=flux-system \
--path=./k8s/clusters/development
--url=$repository_url \
--branch=$branch_name \
--ignore-paths="k8s/clusters/**/flux-system/" \
flux create kustomization flux-system \
--source=flux-system \
--path=./k8s/clusters/development

0 comments on commit aadc0e4

Please sign in to comment.