Skip to content

Commit

Permalink
Use Google Auth and Cloud Python APIs instead of gcloud CLI (#2083)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovilla authored Sep 17, 2024
2 parents aed2b92 + f507f2d commit dc91617
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 274 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_gcp_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
- name: 'Authenticate to GCP'
uses: 'google-github-actions/auth@v1'
with:
token_format: access_token
workload_identity_provider: ${{ env.GCP_WORKFLOW_PROVIDER }}
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ dependencies = [
"bcrypt==4.0.1",
"boto3==1.34.63",
"cloudflare==2.11.7",
"google-auth==2.31.0",
"google-cloud-compute==1.19.1",
"google-cloud-container==2.49.0",
"google-cloud-iam==2.15.1",
"google-cloud-storage==2.18.0",
"grpc-google-iam-v1==0.13.1",
"jinja2",
"kubernetes==27.2.0",
"pluggy==1.3.0",
Expand Down
13 changes: 0 additions & 13 deletions src/_nebari/provider/cicd/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,6 @@ def setup_python_step():
)


def setup_gcloud():
return GHA_job_step(
name="Setup gcloud",
uses="google-github-actions/auth@v1",
with_={
"credentials_json": "${{ secrets.GOOGLE_CREDENTIALS }}",
},
)


def install_nebari_step(nebari_version):
return GHA_job_step(name="Install Nebari", run=pip_install_nebari(nebari_version))

Expand All @@ -226,9 +216,6 @@ def gen_nebari_ops(config):
step3 = install_nebari_step(config.nebari_version)
gha_steps = [step1, step2, step3]

if config.provider == schema.ProviderEnum.gcp:
gha_steps.append(setup_gcloud())

for step in config.ci_cd.before_script:
gha_steps.append(GHA_job_step(**step))

Expand Down
Loading

0 comments on commit dc91617

Please sign in to comment.