Google Cloud CI/CD
Google Cloud CI/CD provides various tools for continuous integration and deployment and also integrates seamlessly with third-party solutions.
Google Cloud Source Repositories – CSR
- Cloud Source Repositories are fully-featured, private Git repositories hosted on Google Cloud.
- Cloud Source Repositories can be used for collaborative, version-controlled development of any app or service, including those that run on App Engine and Compute Engine.
- Cloud Source Repositories can connect to an existing GitHub or Bitbucket repository. Connected repositories are synchronized with Cloud Source Repositories automatically.
- Cloud Source Repositories automatically send logs on repository activity to Cloud Logging to help track and troubleshoot data access.
- Cloud Source Repositories offer security key detection to block git push transactions that contain sensitive information which helps improve the security of the source code.
- Cloud Source Repositories provide built-in integrations with other GCP tools like Cloud Build, Cloud Debugger, Cloud Operations, Cloud Logging, Cloud Functions, and others that let you automatically build, test, deploy, and debug code within minutes.
- Cloud Source Repositories publishes messages about the repository to Pub/Sub topic.
- Cloud Source Repositories provide a search feature to search for specific files or code snippets.
- Cloud Source Repositories allow permissions to be controlled at the project (all projects) or at the repo level.
Cloud Build
- Cloud Build is a fully-managed, serverless service that executes builds on Google Cloud Platform’s infrastructure.
- Cloud Build can pull/import source code from a variety of repositories or cloud storage spaces, execute a build to produce containers or artifacts, and push them to the artifact registry.
- Cloud Build executes the build as a series of build steps, where each build step specifies an action to be performed and is run in a Docker container.
- Build steps can be provided by Cloud Build and the Cloud Build community or can be custom as well.
- Build config file contains instructions for Cloud Build to perform tasks based on your specifications for e.g., the build config file can contain instructions to build, package, and push Docker images.
- Builds can be started either manually or using build triggers.
- Cloud Build uses build triggers to enable CI/CD automation.
- Build triggers can listen for incoming events, such as when a new commit is pushed to a repository or when a pull request is initiated, and then automatically execute a build when new events come in.
- Cloud Build publishes messages on a Pub/Sub topic called
cloud-builds
when the build’s state changes, such as when the build is created, when the build transitions to a working state, and when the build completes.
Container Registry
- Container Registry is a private container image registry that supports Docker Image Manifest V2 and OCI image formats.
- Container Registry provides a subset of Artifact Registry features.
- Container Registry stores its tags and layer files for container images in a Cloud Storage bucket in the same project as the registry.
- Access to the bucket is configured using Cloud Storage’s identity and access management (IAM) settings.
- Container Registry integrates seamlessly with Google Cloud services.
Container Registry works with popular continuous integration and continuous delivery systems including Cloud Build and third-party tools such as Jenkins.
Artifact Registry
- Artifact Registry is a fully-managed service with support for both container images and non-container artifacts, Artifact Registry extends the capabilities of Container Registry.
- Artifact Registry is the recommended service for container image storage and management on Google Cloud.
- Artifact Registry comes with fine-grained access control via Cloud IAM. This enables scoping permissions as granularly as possible, for example to specific regions or environments as necessary.
- Artifact Registry supports the creation of regional repositories
Container Registry vs Artifact Registry
GCP Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- GCP services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- GCP exam questions are not updated to keep up the pace with GCP updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.