Th CI/CD pipeline created using a YAML configuration automates the process of building, testing, and deploying your application to Google Cloud Run, ensuring a streamlined and secure deployment process.
Changes
One file added: ci-cd.yml (Location: .github/workflows/ci-cd.yml)
Change made in the requirements.txt. ‘Fastapi’ changed to ‘fastapi[standard]'
Activated GitHub actions for the repo for CI/CD deployment.
Testing
Setting Up GitHub Actions and Configuring GCP Cloud Run: GitHub Actions was activated for the code repository for the first time. As part of the setup, the Google Cloud Run API was enabled to allow deployment of the application. Additionally, a Google Cloud service account was created, and its JSON key was securely stored as a GitHub Secret (GOOGLE_CREDENTIAL) to authenticate the deployment process.
Triggering the YAML file through GitHub Actions: The ‘ci-cd.yml’ file triggers the workflow for the pipeline with continuous integration and deployment. Each time a new pull request is made and closed on staging branch, continuous integration/deployment is triggered using GitHub actions.
Results
The pipeline passes all the tests, and the repo can complete CI/CD process.
Notes
This CI/CD pipeline automates the process of building, testing, and deploying your application, ensuring a reliable and secure deployment to Google Cloud Run. You can maintain and troubleshoot the pipeline effectively by following the steps outlined in the documentation.
Summary
Th CI/CD pipeline created using a YAML configuration automates the process of building, testing, and deploying your application to Google Cloud Run, ensuring a streamlined and secure deployment process.
Changes
ci-cd.yml
(Location: .github/workflows/ci-cd.yml)requirements.txt
. ‘Fastapi’ changed to ‘fastapi[standard]'Testing
Setting Up GitHub Actions and Configuring GCP Cloud Run: GitHub Actions was activated for the code repository for the first time. As part of the setup, the Google Cloud Run API was enabled to allow deployment of the application. Additionally, a Google Cloud service account was created, and its JSON key was securely stored as a GitHub Secret (
GOOGLE_CREDENTIAL
) to authenticate the deployment process.Triggering the YAML file through GitHub Actions: The ‘ci-cd.yml’ file triggers the workflow for the pipeline with continuous integration and deployment. Each time a new pull request is made and closed on
staging
branch, continuous integration/deployment is triggered using GitHub actions.Results
The pipeline passes all the tests, and the repo can complete CI/CD process.
Notes
Screenshots