Minimal CI Server
A continuous integration server written from scratch in Java. On every push it checks out the commit, builds it with Maven, runs the tests and reports the result to GitHub. The server itself has about 70% test coverage.
~70%
CODE COVERAGE
4
PIPELINE STAGES
5
TEAM SIZE
Overview
For KTH's DD2480 (Fundamentals of Software Engineering), our team of five built a small CI server in Java. It does the basic job of something like Jenkins: it listens for GitHub push events, builds the code, runs the tests and reports the result back on the commit.
What I did
- Wrote the core pipeline that runs git checkout → Maven build → tests → GitHub commit status for each push. Each stage handles and reports its own failures.
- Built the GitCheckout service. It clones the repository and checks out the pushed commit into its own temporary folder for each build, so builds running at the same time don't interfere with each other.
- Used dependency injection to separate status reporting from the pipeline logic. The pipeline doesn't know whether it's talking to the real GitHub API or a mock, which let us test it without making real API calls.
- Helped the team stick to our branch workflow (feature → dev → main), with two reviewer approvals and passing CI on every merge.
Testing
We developed the CI server under CI too, and got to about 70% coverage with unit and integration tests. Since we were using our own tool while building it, we ran into its problems early and could fix them quickly.
Source
Code and documentation: github.com/a-runebou/DD2480-CI-V
APPENDIX A // MEDIA
IMAGE SLOT · AWAITING UPLOAD
IMAGE SLOT · AWAITING UPLOAD