Our CI/CD pipelines utilize a Docker build image configured with support for GoLang, Rust, MUSL, OSXCross and Protobuf. The circle.yml
file references this Docker container to handle building, testing, and creating release packages.
The necessity for a custom builder arises from compatibility issues between the protobuf
library and Chronograf's Python UDFs. The cross-builder
was updated to protobuf
version 26.1
in PR #669, introducing breaking changes in the Python protobuf library. Specifically, protobuf 5.26.1 on PyPI does not support Python 2. Consequently, using the newest cross-builder
would result in the loss of Python v2 support in UDFs.
MUSL
compiler. In the current state (2024-06-11
) the MUSL
compiler requires Intel processor to build. This means that the custom builder is not able to build on Apple Silicon hardware.
To update component versions like GoLang, Rust, and Protobuf, modifications must be made in Dockerfile_build
. After updates, a new Docker image needs to be built, published, and then utilized in CI.
The Rust version is defined in the Dockerfile_build
file. The Rust version should be same as the used version for flux
library.
export QUAY_CD_USER=<quay.io username>
export QUAY_CD_PASSWORD=<quay.io token>
Navigate to the builder directory and execute the build script:
cd $KAPACITOR_REPOSITORY_ROOT/builder
./Dockerfile_build_push.sh
- Update the
cross-builder
tag in.circleci/config.yml
to the new version. - Update the
quay.io/influxdb/builder
tag inDockerfile_build_ubuntu64
to reflect the new version.
To test new deployed builder you should run the following command in the root directory to build the kapacitor
:
./build.sh --debug --clean --generate --package --package-udfs --platform=all --arch=all --checksum