Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Max Fisher <[email protected]>
  • Loading branch information
maxfisher-g committed Oct 26, 2023
1 parent 70a774c commit d36ac5d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions infra/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ if [[ -z ${GIT_TAG} ]]; then
exit 1
fi

echo "git checkout ${GIT_TAG}"
git checkout "${GIT_TAG}"

if ! git diff-index --quiet HEAD; then
echo "there are uncommitted changes, please ensure the repo is clean"
exit 1
fi

gcloud container clusters get-credentials analysis-cluster --zone=us-central1-c --project=ossf-malware-analysis

pushd infra/worker || echo "could not change to infra/worker directory" && exit 1
pushd infra/worker || echo "pushd infra/worker failed" && exit 1

echo "Were any changes made to the k8s config?"
echo "Enter y to apply config changes and then restart workers, n to just restart, ctrl-C to exit"
read yn
read -r yn
case $yn in
[Yy]* )
echo "kubectl apply -f ."
echo "kubectl apply -f $(pwd)"
kubectl apply -f .
;;
[Nn]* )
Expand All @@ -24,3 +31,5 @@ case $yn in
;;
esac


popd || echo "failed to popd" && exit 1

0 comments on commit d36ac5d

Please sign in to comment.