GCP Cloud BuildΒΆ

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.

Environment variables and prerequisites:

export GOOGLE_PROJECT=<Google Project Name>
export GOOGLE_APPLICATION_CREDENTIALS=<Path To Google Auth Credentials>

Your repository should be connected to Cloud Source Repositories manually. Your repository should have a cloudbuild.yaml file for CI configuration.

Code Deploy configuration block:

cicd:
testcluster-mng-cluster:
    type: provision-cloud-ci
    app: sample-app
    app_name: sock-shop-frontend
    repo_name: opengine-sampleapp-sockshop-front-end
    branch_name: master # or any: .*
    cloudbuild_file_path: scripts/ci/cloudbuild.yaml

Element

Description

cicd

Parent element of CICD configuration that contains a list of applications that are to be deployed in clusters managed by OpeNgine.

testcluster-mng-cluster

Traget cluster for deploy.

type

For Cloud CI, type can have only one value - provision-cloud-ci

app

Application Name

repo_name

Name of Cloud Source Repositories.

branch_name

Branch name for trigger creation

cloudbuild_file_path

Path to cloud build configuration file.