- Use a terminal to authenticate gcloud:
gcloud auth login
- Manually create a project in CloudPlayground. See https://docs.bol.io/cloud-setup/way-of-working/using_playground.html#_using_gcloud
- Set default project:
gcloud config set project <projectid>
- Create the build trigger
gcloud beta builds triggers create github \
--name="famous-places-trigger" \
--repo-name="spaces-summit-famous-places" \
--repo-owner="kuipercm" \
--branch-pattern="^master$" \
--build-config="cloudbuild.yaml" \
--ignored-files="readme.md"
- At this point, there should be a cloud build trigger created which should run and deploy the app to Cloud Run.
- The app itself creates a bucket and a topic (currently) to store uploaded files.
- To see your services use
gcloud run services list
, you will also find the url here! - To test the app, perform the following command:
curl --location --request PUT 'https://famous-places-3guutasc6a-ez.a.run.app/api/upload' \
--header 'Content-Type: multipart/form-data' \
--header "Authorization: Bearer $(gcloud auth print-identity-token)" \
--form 'photo=@<some image>'
The file should appear in the bucket with its name replaced by a UUID.