Skip to content

Commit

Permalink
fix(local-setup): improve cleanup process in start.sh and update repo…
Browse files Browse the repository at this point in the history
…sitory version
  • Loading branch information
nexus49 committed Feb 9, 2025
1 parent ad830ca commit 8e952f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
.secret
bin/
node_modules/
./oci/
oci/
2 changes: 1 addition & 1 deletion local-setup/kustomize/components/openmfp/repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ spec:
url: oci://ghcr.io/openmfp/helm-charts/openmfp
ref:
# renovate: datasource=docker registryUrl=https://ghcr.io depName=ghcr.io/openmfp/helm-charts/openmfp
semver: 0.0.200
semver: 0.0.206
secretRef:
name: ghcr-credentials
12 changes: 8 additions & 4 deletions local-setup/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ if [ "${1}" == "oci" ]; then
kubectl port-forward svc/registry 5000:5000 --context kind-openmfp &
sleep 1

for dir in "oci/"; do
cleanup() {
echo -e "${COL}[$(date '+%H:%M:%S')] Cleaning up background processes ${COL_RES}"
pkill -f "kubectl port-forward svc/registry 5000:5000"
}
trap cleanup EXIT

OCIDIR=$SCRIPT_DIR/../../oci
for dir in $OCIDIR; do
if [ -d "$dir" ]; then
echo -e "${COL}[$(date '+%H:%M:%S')] Listing files in directory: $dir ${COL_RES}"
for file in "$dir"/*; do
Expand All @@ -76,9 +83,6 @@ if [ "${1}" == "oci" ]; then
exit 1
fi
done

# kill the port-forward process
pkill -f "kubectl port-forward svc/registry 5000:5000"
else
kubectl apply -k $SCRIPT_DIR/../kustomize/overlays/default
fi
Expand Down

0 comments on commit 8e952f2

Please sign in to comment.