Add cloud build badges in 2 minutes.
- Create a cloud storage bucket (tutorial here).
- Create a folder in the bucket named
build
. - Download failure and success badges (follow links and save).
- Upload both badges to the google storage bucket/folder created in the previous step (e.g.
minikube-ci-example/build/success.svg
). - Create a placeholder for your badge (e.g.
minikube-ci-example/build/working.svg
(make permissions public). - Deploy the cloud function as the badge name and set the function trigger to the cloud-builds pubsub topic.
gcloud functions deploy working --runtime nodejs10 --trigger-resource cloud-builds --trigger-event google.pubsub.topic.publish
- Add badge to README.md
# README.md
[![cloud build status](https://storage.googleapis.com/minikube-ci-example/build/working.svg)](https://pantheon.corp.google.com/cloud-build/dashboard?project=k8s-minikube)
- For more detail, please check cloud-build-badge