CI/CD Pipeline
The docker-openresty images are built, tested, and published through an automated Continuous Integration and Continuous Deployment (CI/CD) pipeline.
CI Providers
The project uses two CI providers to cover the different operating systems:
- Travis CI: Used for building all Linux-based images across multiple architectures (
amd64,aarch64,s390x). The configuration is defined in.travis.yml. - Appveyor: Used for building the Windows-based images. The configuration is defined in
appveyor.yml.
Build Process
The pipeline is structured in stages to manage the build process efficiently, especially for multi-architecture images.
-
Build Stage: Individual jobs compile and build the Docker image for each specific flavor and architecture (e.g.,
jammy-amd64,alpine-aarch64). This is handled by thedocker_build_and_push_flavor.shscript. -
Manifest Stage: After all architecture-specific images for a flavor are built and pushed, a subsequent job creates and pushes a Docker manifest list. This manifest list is what allows a single tag (e.g.,
openresty/openresty:jammy) to work across multiple architectures. This is handled by thedocker_manifest.shscript. -
Fat Build Stage: "Fat" images, which are based on other images, are built in a later stage to ensure their base image is already available.
-
Fat Manifest Stage: Manifests for the fat images are created.
Build Scripts
The CI jobs execute a set of shell scripts to handle the Docker commands:
docker_build_and_push_flavor.sh: Builds and pushes a single image for a specific flavor and architecture. It handles tagging for bothmasterbranch builds and versioned Git tags.docker_build_and_push_flavor_fat.sh: A specialized version for building-fatimages, ensuring it pulls the correct base image tag.docker_manifest.sh: Usesdocker manifest createanddocker manifest pushto assemble the multi-arch images.docker_tag_alias.sh: Creates alias tags, for example, makingcentos-rpman alias forcentos.
This structured, script-driven approach ensures that the build process is repeatable, transparent, and maintainable.