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

Update gcloud usage #682

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
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
27 changes: 20 additions & 7 deletions .github/workflows/branch-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,17 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 2 # To be able to compare with the previous commit and detect changed files
- uses: google-github-actions/setup-gcloud@master
- name: Disable git push
run: |
git remote set-url --push origin no_push
- name: Authenticate with Google Cloud platform
uses: google-github-actions/auth@v0.5.0
with:
service_account_key: ${{ secrets.CAPACT_GCS_CREDS }}
export_default_credentials: true
create_credentials_file: true
cleanup_credentials: true
credentials_json: ${{ secrets.GCS_CREDS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.6.0
- name: Release Helm Charts if were changed
env:
MAIN_BUILD: "true"
Expand Down Expand Up @@ -190,11 +197,17 @@ jobs:
upx -V
- name: Set up GoReleaser
run: go install github.com/goreleaser/goreleaser@v1.1.0
- name: Set up GCS
uses: google-github-actions/setup-gcloud@master
- name: Disable git push
run: |
git remote set-url --push origin no_push
- name: Authenticate with Google Cloud platform
uses: google-github-actions/auth@v0.5.0
with:
service_account_key: ${{ secrets.CAPACT_GCS_CREDS }}
export_default_credentials: true
create_credentials_file: true
cleanup_credentials: true
credentials_json: ${{ secrets.GCS_CREDS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.6.0
- name: Release latest CLI
run: |
make release-latest-binaries
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/cluster_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ jobs:
- name: Setup environment
run: |
. ./hack/ci/setup-env.sh
- uses: google-github-actions/setup-gcloud@master
- name: Disable git push
run: |
git remote set-url --push origin no_push
- name: Authenticate with Google Cloud platform
uses: google-github-actions/auth@v0.5.0
with:
export_default_credentials: true
service_account_key: ${{ secrets.CAPACT_GKE_CREDS }}
create_credentials_file: true
cleanup_credentials: true
credentials_json: ${{ secrets.GCS_CREDS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.6.0
- name: Get cluster credentials
run: |
gcloud config set project ${PROJECT_ID}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/make-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ jobs:
run: |
echo "Preventing pushing to the origin..."
git remote set-url --push origin no_push

GCP_CREDS_FILENAME=$(basename $GCP_CREDS_FILEPATH)
echo "Adding ${GCP_CREDS_FILENAME} to local .gitignore..."
echo "${GCP_CREDS_FILENAME}" >> .gitignore

echo "Committing the change..."
git add .gitignore
git commit -m "Ignore credentials"
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.4.0
uses: google-github-actions/setup-gcloud@v0.6.0
- name: Run GoReleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/recreate_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ jobs:
- name: Setup environment
run: |
. ./hack/ci/setup-env.sh
- uses: google-github-actions/setup-gcloud@master
- name: Disable git push
run: |
git remote set-url --push origin no_push
- name: Authenticate with Google Cloud platform
uses: google-github-actions/auth@v0.5.0
with:
export_default_credentials: true
service_account_key: ${{ secrets.CAPACT_GKE_CREDS }}
create_credentials_file: true
cleanup_credentials: true
credentials_json: ${{ secrets.GCS_CREDS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.6.0
- name: Setup terraform
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
Expand Down