Skip to content

Commit

Permalink
Fix auth for clean up actions (#31888)
Browse files Browse the repository at this point in the history
* Fix auth for clean up actions

* Fix echo on mac
  • Loading branch information
Abacn authored Jul 15, 2024
1 parent 36f1631 commit faff55c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/beam_CancelStaleDataflowJobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ jobs:
uses: ./.github/actions/setup-environment-action
with:
disable-cache: true
- name: Authenticate on GCP
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: run cancel stale dataflow jobs
uses: ./.github/actions/gradle-command-self-hosted-action
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/beam_CleanUpGCPResources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ jobs:
uses: ./.github/actions/setup-environment-action
with:
disable-cache: true
- name: Authenticate on GCP
id: auth
uses: google-github-actions/setup-gcloud@v0
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Install gcloud bigtable cli
run: gcloud components install cbt
- name: run cleanup GCP resources
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/beam_CleanUpPrebuiltSDKImages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ jobs:
uses: ./.github/actions/setup-environment-action
with:
disable-cache: true
- name: Authenticate on GCP
id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: GCloud Docker credential helper
run: |
gcloud auth configure-docker gcr.io && \
Expand Down
4 changes: 2 additions & 2 deletions .test-infra/tools/stale_bq_datasets_cleaner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Deletes stale and old BQ datasets that are left after tests.
#

set -exuo pipefail
set -euo pipefail

PROJECT=apache-beam-testing
MAX_RESULT=1500
Expand Down Expand Up @@ -51,7 +51,7 @@ for dataset in ${BQ_DATASETS[@]}; do
# date command usage depending on OS
echo "Deleted $dataset (modified `date -d @$LAST_MODIFIED`)"
elif [[ $OSTYPE == "darwin"* ]]; then
echo "Deleted $dataset (modified `date -r @$LAST_MODIFIED`)"
echo "Deleted $dataset (modified `date -r $LAST_MODIFIED`)"
fi
else
echo "Tried and failed to delete $dataset"
Expand Down

0 comments on commit faff55c

Please sign in to comment.