Create a GitLab repository that will serve as a how-to guide, and will contain:
- a README file with an overview of files in the repository and basic instructions on how to use them
- Blubber and GitLab CI configuration files with configuration of common CI elements for different projects and with comments explaining the configuration options in use
- Application code to test the configuration files
Use cases to consider:
- basic GitLab CI tests
building container images using Dockerfiles and Blubber, and pushing them to different registriesgenerating build artifacts, for example a Debian package, and pushing these artifacts to centralized repositories (for example an apt repository)- running extra services necessary for pipeline jobs, for example a database used in tests (implemented in the end-to-end test stage)
Other considerations:
use these configuration files in custom GitLab templates?- ensure code and configuration files in this repository are tested automatically
Summary
(largely copied from this comment)
The repository is available on GitLab: https://gitlab.wikimedia.org/repos/technical-documentation/deployment-pipeline-sandbox
The repository contains:
- A README file with instructions for testing Blubber variants locally
- Five examples of web applications with the same functionality (display a plain text response which includes a random number - changed on every reload).
- Languages used: Java, NodeJS, PHP, Python, and Rust
- Each application has tests for its functionality
- Each application uses standard and popular (to my knowledge) build mechanisms, libraries, and tools for the given language.
- Separate Blubber variants for building, testing, and running these applications (in .pipeline/blubber.yaml)
- GitLab CI job configurations for unit tests and end-to-end tests (in .gitlab-ci.yml)
Different variants and configurations showcase:
- how to use different builder configurations
- how to use Blubber and GitLab CI with different project directory structures (the NodeJS application uses a different configuration from the rest)
- how to use images from the Wikimedia registry (all applications) and from Docker Hub (Java and Rust applications)
- how to use a multi-stage image and transfer build artifacts between image stages (Rust application)
- how to run an application as a service in GitLab CI
- how to specify stages and job dependencies in GitLab CI
- how to use Kokkuri in your project
Content in the repository is automatically tested on merge/commit. Tests also run periodically, once a month.
Merge requests and comments welcome!