Automatically building and deploying containers into Cloud Run when changes pushed to CSR repository.
GCP Serverless CI/CD Pipeline Architecture
In this article, we’ll see how to configure a CI/CD pipeline on GCP using Cloud Source Repository, Cloud Build, Container Registry and Cloud Run.
Google Cloud Source Repositories are fully featured, private Git repositories hosted on Google Cloud Platform. Collaborate easily and securely manage your code on a fully featured, scalable, private Git repository.
Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives.
Container Registry is a private container image registry that runs on Google Cloud.
Fully managed compute platform for deploying and scaling containerized applications quickly and securely
To follow this tutorial, you will need access to GCP Project
The sample application we’ll use for this tutorial is a very simple Flask application.
If you want to know more about the app, please follow my previous blog
This is config service using Google Sheet.
It exposes two endpoints
The Dockerfile of sample application
Go to cloud shell (right corner “>_” ) icon. Run following command
gcloud iam service-accounts create sample-app
The service account created as ‘sample-app@$PROJECT_ID.iam.gserviceaccount.com’
This step will create repository in Cloud Source Repository and then clone it from Github.
Create Repository
2. Enter the repository name and project name.
#google-cloud-platform #ci-cd-pipeline #google-cloud-run #serverless #devops