I use this example project to try out google cloud build (with docker-compose). A few tweaks are made to make it run again.
It creates a pipeline in cloud build to build images, run the services, and run a simple integration test.
The main juice is cloudbuild.compose.yaml
, which is borrowed from here.
Steps:
- Setup your gcloud
- Install docker-compose into your project's registry
git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git
cd docker-compose
gcloud builds submit --config=cloudbuild.yaml .
- Use the following command to manually trigger a build:
gcloud builds submit --config=cloudbuild.compose.yaml .
You can certainly connect the github repo with cloud build as a trigger.
Todos:
- Manage secrets
- Customized build logic
- Deployment
- Google provides tool for local debugging.