Skip to content

Commit dc91617

Browse files
authored
Use Google Auth and Cloud Python APIs instead of gcloud CLI (#2083)
2 parents aed2b92 + f507f2d commit dc91617

File tree

6 files changed

+90
-274
lines changed

6 files changed

+90
-274
lines changed

.github/workflows/test_gcp_integration.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
- name: 'Authenticate to GCP'
7474
uses: 'google-github-actions/auth@v1'
7575
with:
76-
token_format: access_token
7776
workload_identity_provider: ${{ env.GCP_WORKFLOW_PROVIDER }}
7877
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
7978

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ dependencies = [
6060
"bcrypt==4.0.1",
6161
"boto3==1.34.63",
6262
"cloudflare==2.11.7",
63+
"google-auth==2.31.0",
64+
"google-cloud-compute==1.19.1",
65+
"google-cloud-container==2.49.0",
66+
"google-cloud-iam==2.15.1",
67+
"google-cloud-storage==2.18.0",
68+
"grpc-google-iam-v1==0.13.1",
6369
"jinja2",
6470
"kubernetes==27.2.0",
6571
"pluggy==1.3.0",

src/_nebari/provider/cicd/github.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,6 @@ def setup_python_step():
201201
)
202202

203203

204-
def setup_gcloud():
205-
return GHA_job_step(
206-
name="Setup gcloud",
207-
uses="google-github-actions/auth@v1",
208-
with_={
209-
"credentials_json": "${{ secrets.GOOGLE_CREDENTIALS }}",
210-
},
211-
)
212-
213-
214204
def install_nebari_step(nebari_version):
215205
return GHA_job_step(name="Install Nebari", run=pip_install_nebari(nebari_version))
216206

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

229-
if config.provider == schema.ProviderEnum.gcp:
230-
gha_steps.append(setup_gcloud())
231-
232219
for step in config.ci_cd.before_script:
233220
gha_steps.append(GHA_job_step(**step))
234221

0 commit comments

Comments
 (0)