All Projects → Philmod → gcb-docker-compose

Philmod / gcb-docker-compose

Licence: Apache-2.0 License
Example on how to run integration tests on Google Container Builder, using docker-compose.

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

gcb-docker-compose

gcb-docker-compose demonstrates how to run integration tests on Google Cloud Build (GCB) using docker-compose.

This sample application is a simple counter gRPC server with add, reset, get, and watch methods. The application uses Redis for storage.

What is Cloud Build?

Cloud Build is a Google Cloud Platform service that uploads your source code and executes your build in a series of build steps. GCB can produce any artifacts produced by your application. For example, GCB can create Docker container images and push them to a private registry, such as Google Container Registry

Each build step is run in its container on the same local network. This allows build steps to communicate with each other and share data.

The ability to communicate and share data between build steps is used in this example repository: one build step runs the counter app and its dependencies in the background, and another build step runs the integration test steps against this running stack.

Understanding the build request

GCB builds are executed using build request files, YAML-formatted configuration files containing build steps.

The build steps in this example's build request file, cloudbuild.yaml, contain the following instructions:

  1. Locate, pull, and install the dependencies necessary to execute the build
  2. Run the unit tests
  3. Build the Docker image of the counter application
  4. In the background, start a stack with the newly-built application and its dependencies
  5. Run the integration tests against this running stack
  6. Push the newly-built and tested image to the registry
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].