Skip to content

Commit

Permalink
Merge pull request #6000 from shaneknapp/fix-hub-image-deploy
Browse files Browse the repository at this point in the history
[DH-301] use bash instead of kubectl to get deployments from said directory
  • Loading branch information
shaneknapp authored Aug 23, 2024
2 parents 128495b + 848c3a7 commit 5269775
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@ jobs:
if: ${{ env.DEPLOY }}
uses: google-github-actions/setup-gcloud@v2
with:
install_components: 'gke-gcloud-auth-plugin,kubectl'

- name: Get GKE credentials for the cluster
if: ${{ env.DEPLOY }}
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: ${{ secrets.GKE_CLUSTER_NAME }}
location: ${{ secrets.GKE_CLUSTER_LOCATION }}
install_components: 'gke-gcloud-auth-plugin'

- name: Install SOPS
if: ${{ env.DEPLOY }}
Expand Down Expand Up @@ -94,7 +87,13 @@ jobs:
- name: Deploy base hub images to staging
if: ${{ env.DEPLOY }}
run: |
ignored_directories=("template")
while read deployment; do
for ignored in "${ignored_directories[@]}"; do
if [[ "${deployment}" == "${ignored}" ]]; then
continue 2 # skip to the next "while read deployment"
fi
done
echo "Pretending to deploy base hub image to ${deployment} :P"
echo "hubploy deploy --debug ${deployment} hub staging"
done < <(kubectl get namespaces -A | grep -e staging | awk -F"-" '{print$1}')
done < <(find deployments/ -maxdepth 1 -type d -printf '%f\n' | grep -v template)

0 comments on commit 5269775

Please sign in to comment.