New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Cloud Scheduler builds to use PubSub not HTTP #148
Comments
Workflow will need to create the Cloud Build first, rather than having it in the API call directly so still a use case for the former I guess. But a deploy function would do following: # create build object
cloudbuild <- system.file("cloudbuild/cloudbuild.yaml",
package = "googleCloudRunner")
the_build <- cr_build_make(cloudbuild)
# create pub/sub topic
library(googlePubsubR)
pubsub_auth()
topics_create("test-topic")
# create build trigger that will work from pub/subscription
pubsub_trigger <- cr_buildtrigger_pubsub("test-topic")
cr_buildtrigger(the_build, name = "pubsub-triggered", trigger = pubsub_trigger)
# create scheduler that calls the pub/sub topic
cr_schedule("cloud-build-pubsub", "15 5 * * *",
pubsubTarget = cr_build_schedule_pubsub("test-topic")) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It all works ok now in new GCP project |
Turning the Cloud Build API off and on again on old projects looks to fix not being able to use PubSub triggers issue. |
For PubSub triggers I need to add the new property https://cloud.google.com/build/docs/api/reference/rest/v1/projects.locations.triggers#gitreposource |
More reliable, better utility since you can have other subscriptions attached to the topic the scheduler hits, and less mucking around with authentication for the Cloud Scheduler (big plus)
#140
The text was updated successfully, but these errors were encountered: