Skip to content

Commit

Permalink
Check latest bigtable version is not empty for autopush deployment (#…
Browse files Browse the repository at this point in the history
…2733)

The table could be empty for newly created import group.
  • Loading branch information
shifucun authored May 23, 2023
1 parent 3f53650 commit f83c4e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/deploy_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ yq eval -i '.tables = []' deploy/storage/base_bigtable_info.yaml
for src in $(gsutil ls gs://datcom-control/autopush/*_latest_base_cache_version.txt); do
echo "Copying $src"
export TABLE="$(gsutil cat "$src")"
yq eval -i '.tables += [env(TABLE)]' deploy/storage/base_bigtable_info.yaml
if [[ $TABLE != "" ]]; then
yq eval -i '.tables += [env(TABLE)]' deploy/storage/base_bigtable_info.yaml
fi
done

cd $ROOT
Expand All @@ -62,7 +64,7 @@ do
export index=$index
REGION=$(yq eval '.region.others[env(index)]' deploy/gke/"$ENV".yaml)
echo $REGION
if [[ $REGION != '' ]]; then
if [[ $REGION != "" ]]; then
$ROOT/scripts/deploy_gke_helm.sh -e $ENV -l $REGION
fi
done

0 comments on commit f83c4e9

Please sign in to comment.