cr_deploy_docker_trigger | R Documentation |
This helps the common use case of building a Dockerfile based on the contents of a GitHub repo, and sets up a build trigger so it will build on every commit.
cr_deploy_docker_trigger( repo, image, trigger_name = paste0("docker-", image), image_tag = c("latest", "$SHORT_SHA", "$BRANCH_NAME"), ..., substitutions = NULL, ignoredFiles = NULL, includedFiles = NULL, timeout = NULL, projectId_target = cr_project_get() )
repo |
The git repo holding the Dockerfile from cr_buildtrigger_repo |
image |
The name of the image you want to build |
trigger_name |
The trigger name |
image_tag |
What to tag the build docker image |
... |
Arguments passed on to
|
substitutions |
A named list of Build macro variables |
ignoredFiles |
ignored_files and included_files are file glob matches extended with support for "**". |
includedFiles |
If any of the files altered in the commit pass the ignored_files |
timeout |
Timeout for build |
projectId_target |
The project to publish the Docker image to. The image will be built under the project configured via cr_project_get. You will need to give the build project's service email access to the target GCP project via IAM for it to push successfully. |
This creates a buildtrigger to do a kamiko cache enabled Docker build upon each commit, as defined by your repo settings via cr_buildtrigger_repo. It will build all tags concurrently.
cr_deploy_docker which lets you build Dockerfiles for more generic use cases
Other Deployment functions:
cr_deploy_docker()
,
cr_deploy_packagetests()
,
cr_deploy_pkgdown()
,
cr_deploy_run_website()
,
cr_deploy_run()
,
cr_deploy_r()
## Not run: repo <- cr_buildtrigger_repo("MarkEdmondson1234/googleCloudRunner") # create trigger that will publish Docker image to gcr.io/your-project/test upon each GitHub commit cr_deploy_docker_trigger(repo, "test", dir = "cloud_build") # build in one project, publish the docker image to another project (gcr.io/another-project/test) cr_deploy_docker_trigger(repo, "test", projectId_target = "another-project", dir = "cloud_build") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.