Hands-On Microservices with Kubernetes
上QQ阅读APP看书,第一时间看更新

Reviewing the source tree

Continuous integration is about building and testing stuff. The first step is to understand what needs to be built and tested in Delinkcious. Let's have another look at the Delinkcious source tree:

$ tree -L 2
.
├── LICENSE
├── README.md
├── build.sh
├── cmd
│ ├── link_service_e2e
│ ├── social_graph_service_e2e
│ └── user_service_e2e
├── go.mod
├── go.sum
├── pkg
│ ├── db_util
│ ├── link_manager
│ ├── link_manager_client
│ ├── object_model
│ ├── social_graph_client
│ ├── social_graph_manager
│ ├── user_client
│ └── user_manager
└── svc
├── api_gateway_service
├── link_service
├── social_graph_service
└── user_service

The pkg directory contains packages that are used by services and commands. We should run the unit tests of these packages. The svc directory contains our microservices. We should build those services, package each one in a properly versioned Docker image, and push those images to DockerHub (the image registry). The cmd directory currently contains end-to-end tests. Those are designed to run locally and don't need to be built by the CI pipeline (this can be changed if you want to add end-to-end tests to our testing processes).