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

Use Google Auth and Cloud Python APIs instead of gcloud CLI #2083

Merged
merged 22 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0f79dfb
modified the projects and zones function
swastik959 Oct 22, 2023
3051574
[pre-commit.ci] Apply automatic pre-commit fixes
pre-commit-ci[bot] Oct 22, 2023
5d593b1
modified whole code
swastik959 Nov 3, 2023
53ca190
[pre-commit.ci] Apply automatic pre-commit fixes
pre-commit-ci[bot] Nov 3, 2023
2105e6e
Merge branch 'develop' into swastik
marcelovilla Jul 25, 2024
7d319b5
Fix google dependency versions
marcelovilla Jul 26, 2024
1088d94
Remove unused functions and fix calls to the Google Python APIs
marcelovilla Aug 2, 2024
a0694d1
Merge branch 'develop' into swastik
marcelovilla Aug 2, 2024
97677ec
[pre-commit.ci] Apply automatic pre-commit fixes
pre-commit-ci[bot] Aug 2, 2024
6f3d813
Add grpc-google-iam-v1
marcelovilla Aug 5, 2024
d6498f9
Merge branch 'swastik' of https://github.com/swastik959/nebari into s…
marcelovilla Aug 5, 2024
4daa377
Load credentials explictly from file and get project ID from environe…
marcelovilla Aug 5, 2024
ab7f216
Check if credentials are a file or not before reading them
marcelovilla Aug 5, 2024
4ac3911
Remove gcloud step
marcelovilla Aug 5, 2024
8a47dcd
Add google-auth as an explicit dependency
marcelovilla Aug 6, 2024
7be8fff
Use string ending instead of Path.isfile to check whether env var is …
marcelovilla Aug 6, 2024
bdddbe2
Fix dependency version specifier
marcelovilla Aug 6, 2024
6338899
Fix cleanup functions.
marcelovilla Aug 7, 2024
1c2fec3
Add explicit google auth scopes
marcelovilla Aug 9, 2024
d54739b
Merge branch 'develop' into swastik
marcelovilla Sep 4, 2024
88785a1
Merge branch 'develop' into swastik
marcelovilla Sep 5, 2024
f507f2d
Merge branch 'develop' into swastik
Adam-D-Lewis Sep 11, 2024
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
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to add this library explicitly as our conda tests where failing because of it.

"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())
Adam-D-Lewis marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down
Loading
Loading