Last active
April 13, 2022 18:43
-
-
Save Geremie/09cb9c8d688f7cf6cb8815b1b589dc3b to your computer and use it in GitHub Desktop.
Manage your Private Python Packages with Artifact Registry (Part 1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Clone the cloud function repository | |
| git clone https://gitlab.com/marcdjoh/cloud-functions-pull-from-artifact-registry.git | |
| # Activate the cloud functions API | |
| gcloud services enable cloudfunctions.googleapis.com | |
| # Activate the cloud build API | |
| gcloud services enable cloudbuild.googleapis.com | |
| # Create a service account for the fucntion | |
| gcloud iam service-accounts create <your_service_account_id> | |
| # Deploy the cloud function | |
| gcloud functions deploy <your_function_name> --runtime=python37 --entry-point=main \ | |
| --trigger-http \ | |
| --region=<your_function_location> \ | |
| --service-account=<your_service_account_id>@<your_gcp_project>.iam.gserviceaccount.com \ | |
| --allow-unauthenticated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment