- Go to Google Cloud Build (https://console.cloud.google.com/cloud-build/triggers)
- Add trigger
- Select your source
- Authenticate with your source
- Adjust your trigger settings
- Under Build Configuration, select cloudbuild.yaml
- Add substitution variable "_NAME" and provide the name of the function you want to deploy
- Add a cloudbuild.yaml to your repository e.g.
steps: - name: 'gcr.io/cloud-builders/gcloud' args: ['beta', 'functions', 'deploy', '${_NAME}', '--trigger-http']
If you have any permission issues you might need to go to Project Settings > IAM and make sure a member exists with the following roles:
- Cloud Build Service Account
- Cloud Build Editor
- Cloud Functions Developer
No comments:
Post a Comment