commit | bfd6ed2a9883a5e273a952203a58ae0d29daaaeb | [log] [tgz] |
---|---|---|
author | Joan Touzet <joant@atypical.net> | Thu Mar 11 17:43:45 2021 -0500 |
committer | Joan Touzet <joant@atypical.net> | Thu Mar 11 17:43:45 2021 -0500 |
tree | 8cadada6254558c3e5c84a112afa04a65b932151 | |
parent | 64c56af01c7f33c682ed6f3158cca090ab8b6bd9 [diff] |
Drop ppc64le until CI replacement is identified
The main purpose of this repository is to provide scripts that:
It intends to cover a range of both operating systems (Linux, macOS, BSD, Windows) and Erlang versions (17.x, 18.x, 19.x, etc.)
These images are used by Apache Jenkins CI to build CouchDB with every checkin to master
or a release branch (e.g., 2.3.0
).
CouchDB's CI build philosophy is to use Travis (with kerl
) to validate CouchDB against different Erlang versions, and to use Jenkins to validate CouchDB against different OSes and architectures. Where possible, Jenkins also auto-builds convenience binaries or packages. The eventual goal is that these auto-built binaries/packages/Docker images will be auto-pushed to our distribution repos for downstream consumption.
OS / distro | Version | Erlang Versions | Architectures | Docker? |
---|---|---|---|---|
debian | stretch | 19.3.6, 20.3.8.25 | x86_64 , arm64v8 | :heavy_check_mark: |
debian | buster | 20.3.8.25 | x86_64 , arm64v8 | :heavy_check_mark: |
ubuntu | xenial | 20.3.8.25 | x86_64 | :heavy_check_mark: |
ubuntu | bionic | 20.3.8.25 | x86_64 | :heavy_check_mark: |
centos | 6 | 20.3.8.25 | x86_64 | :heavy_check_mark: |
centos | 7 | 20.3.8.25 | x86_64 | :heavy_check_mark: |
centos | 8 | 20.3.8.25 | x86_64 | :heavy_check_mark: |
freebsd | 11.x | default | x86_64 | :x: |
freebsd | 12.0 | default | x86_64 | :x: |
...with support now for any arbitrary Erlang version!
For those OSes that support Docker, we run builds inside of Docker containers. These containers are built using the build.sh
command at the root level.
The base images include all of the build dependencies necessary to build CouchDB except for Erlang and SpiderMonkey 1.8.5. These images are typically used to build the CouchDB SpiderMonkey 1.8.5 binaries for a given OS/version/architecture combination.
Build a base image with:
./build.sh base <distro>-<version>
The platform images include all of the build dependencies necessary to build and full test CouchDB on a given OS/version/architecture combination.
Build a platform image with:
./build.sh platform <distro>-<version>
We want to generate a rebar
binary compatible with all versions of Erlang we support. If we do this on too new a version, older Erlangs won't recognize it. So we always keep an image around with that version.
On the other hand, some OSes won't run older Erlangs because of library changes, so you need to override that environment variable.
Just specify on the command line any of the ERLANGVERSION
, NODEVERSION
, or ELIXIRVERSION
environment variables:
NODEVERSION=8 ELIXIRVERSION=v1.6.1 ERLANGVERSION=17.5.3 ./build.sh platform debian-jessie
The tool also recognizes a special ERLANGVERSION=all
value for the debian-buster
platform. This builds the lowest, default, and highest versions of Erlang using the kerl build system, and installs them to /usr/local/kerl
for activation before builds. This version is intended for use in standard CI runs, such as for pull requests.
This only works from an x86_64
build host.
First, configure your machine with the correct dependencies to build multi-arch binaries:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
This is a one-time setup step. The multiarch/qemu-user-static
docker container run will install the correct qemu static binaries necessary for running foreign architecture binaries on your host machine. It includes special magic to ensure sudo
works correctly inside a container, too.
Then, override the CONTAINERARCH
environment variable when starting build.sh
:
CONTAINERARCH=aarch64 ./build.sh platform debian-stretch
couchdbdev
organization. Ask the CouchDB PMC for assistance with this.export DOCKER_ID_USER="username"
docker login
and enter your password../build.sh platform-upload <distro>-<version>
just as above.build.sh
options./build.sh <command> [OPTIONS] Recognized commands: clean <plat> Removes all images for <plat>. clean-all Removes all images for all platforms & base images. base <plat> Builds the base (no JS/Erlang) image for <plat>. base-all Builds all base (no JS/Erlang) images. *base-upload Uploads the specified couchdbdev/*-base image to Docker Hub. *base-upload-all Uploads all the couchdbdev/*-base images. platform <plat> Builds the image for <plat> with Erlang & JS support. platform-all Builds all images with Erlang and JS support. *platform-upload Uploads the couchdbdev/*-erlang-* images to Docker Hub. *platform-upload-all Uploads all the couchdbdev/*-erlang-* images to Docker. couch <plat> Builds and tests CouchDB for <plat>. couch-all Builds and tests CouchDB on all platforms. Commands marked with * require appropriate Docker Hub credentials.
After building the image as above:
docker run -it couchdbdev/<tag>
where <tag>
is of the format <distro>-<version>-<type>
, such as debian-stretch-erlang-19.3.6
.
./build.sh couch <distro>-<version>
After building the base image as above, head over to the apache/couchdb-pkg repository and follow the instructions there.
bin/
directory to install the dependencies correctly on your new OS/version/platform. Push a PR with these changes.dockerfiles
directory for your new OS../build.sh base <distro>-<version>
. Solve any problems with the build process here. Add your new platform combination to the .travis.yml
file, then push a PR with these changes../build.sh platform <distro>-<version>
. Solve any problems with the build process here. Add your new platform combination to the .travis.yml
file, then push a PR with these changes.Jenkinsfile
. Ask if you need help.We are eager for contributions to enhance the build scripts to support setting up machines with the necessary build environment for:
as well as alternative architectures for the already supported image types (armhf, ppc64le, s390x, sparc, etc).
We know that Docker won't support some of these, but we should be able to at least expand the install scripts for all of these platforms.
See: