Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DH-301] use bash instead of kubectl to get deployments from said directory #6000

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading