Open your VS Code and clone the repository in ssh mode [email protected]:devoteamgcloud/dgc-learning-path-data-template.git
Or from your console.
mkdir your/directory/to/clone
cd your/directory/to/clone
git clone [email protected]:devoteamgcloud/dgc-learning-path-data-template.git
Then create your own branch replacing <your-sandbox-project-id>
with your GCP Sandbox project ID for instance.
git checkout -b <your-sandbox-project-id>
git push --set-upstream origin <your-sandbox-project-id>
https://cloud.google.com/sdk/docs/install-sdk
To have a default authentication
gcloud auth application-default login
or
gcloud auth login
Create your PROJECT_ID
environment variable.
export PROJECT_ID=$(gcloud info --format='value(config.project)')
set PROJECT_ID=$(gcloud info --format='value(config.project)')
Activate GCP APIs
gcloud services enable serviceusage.googleapis.com cloudresourcemanager.googleapis.com cloudbuild.googleapis.com artifactregistry.googleapis.com --project $PROJECT_ID
Add the Editor
role to the SA Cloud build
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")@cloudbuild.gserviceaccount.com" \
--role="roles/editor"
Then go to the GCP Console and access the Cloud Build interface from your project id.
- In the left panel, click on
Triggers
then+ CREATE TRIGGER
- add a trigger name (for instance
trigger-learning-path
) - In
Source -> Repository
, connect to the repository. - In
Source -> Branch
, add your branch name. - leave everything as default and click on
CREATE
.
Well done, you are ready to follow the instructions in the materials folder, starting with chapter_00.md.