Now, setting up continuous deployment for Cloud Run is a snap
Deploying code to production directly from your dev machine can lead to unforeseen issues: the code might have local changes, the process is manual and error prone, and tests can be bypassed. And later on, it makes it impossible to understand what actual code is running in production. A best practice for avoiding these hardships is to continuously deploy your code when changes are pushed to a branch of your source repository.
As we announced at Google Cloud Next ‘20: OnAir, Cloud Run now allows you to set up continuous deployment in just a few clicks: From the Cloud Run user interface, you can now easily connect to your Git repository and set up continuous deployment to automatically build and deploy your code to your Cloud Run and Cloud Run or Anthos services. This feature is available for both new and existing services.
You can select any repository that includes a Dockerfile or code written in Go, Node.js, Java, Python and .NET. Under the hood, the continuous deployment setup process configures a Cloud Build trigger that builds the code into a container using Docker or Google Cloud Buildpacks, pushes it to Google Container Registry and deploys it to your Cloud Run service. You can later customize this by adding steps to the Cloud Build trigger configuration, for example adding unit or integration tests before deploying.
By default, your code is automatically built and deployed to a new Cloud Run revision, but you can decide if it should receive 100% of the incoming traffic immediately or not, and later gradually migrate traffic using the newly added traffic controls.
With Continuous Deployment set up, the Cloud Run service detail page shows relevant in-context information:
A link to the exact commit in the Git repository that was used for this deployment
A link to the build logs and the build trigger that created this revision / container.
A quick preview of the health of the latest builds.
Pushing your code directly to production was never a good idea. Now, Cloud Run makes it easy for you to embrace best practices like continuous deployment. Give it a try at http://cloud.run/.
Related Google News:
- A Google Cloud VMware Engine cheat sheet March 23, 2021
- High throughput VM logging and metrics agent now in Preview March 23, 2021
- Introducing Network Connectivity Center: A revolution in simplifying on-prem and cloud networking March 23, 2021
- Google Workspace Frontline is now available March 23, 2021
- Next-gen virtual automotive showrooms are here, thanks to Google Cloud, Unreal Engine, and NVIDIA March 23, 2021
- Alternate runtimes makes it easier to build Google Workspace Add-ons, now generally available March 22, 2021
- Road to recovery: How Google Cloud is helping states get the COVID-19 vaccine to more people March 22, 2021
- You make the rules with authentication controls for Cloud Storage March 19, 2021