New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeatable builds #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, this version is much better than the previous one, much much better actually.
Readme should be updated, but updating that will probably be easy because you will mostly remove many things there :)
Overall this makes sense, just left some minor things.
README.md
Outdated
|
||
Because of the specific logic that we have to run tests faster, we have a docker image `debbuilder` that generates a debian package for `postgresql-server-dev-{pg-major}`. The generated package is in the built docker image, specifically in `{container-name}/home/circleci/debs`. The package is pushed to [the-process](https://packagecloud.io/citus-bot/the-process). This package place is added to apt source list and pinned with with the highest priority so that it is chosen over the standard `postgresql-server-dev-{pg-major}` package. | ||
This image contains all the artifacts required to produce a build of citus binaries for exactly 1 postgres version. This image is build for every supported Postgres version. Any scripts driving the build are contained in the citus repostiroy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build -> built
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which one of the 3? :P
built is past tense
build is current tense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is built
README.md
Outdated
```bash | ||
docker push {repositoryName}/{imageName} | ||
``` | ||
TODO: this image has not changed and is currently not build by the Makefile. Future work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
built
WORKDIR /build/postgresql-${PG_VERSION}/ | ||
COPY patches/ patches/ | ||
SHELL ["/bin/bash", "-c"] | ||
RUN if [ -d "patches/${PG_VERSION}/" ]; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea, it is just sad that one mistake in postgres side causes many others to resolve the problem multiple times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only half of the year ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again thanks a lot for the restructure, this should save a LOT of time during upgrades
This doesn't change anything functionally for Citus or our CI. Instead it is a quality of life change to make it easier to maintain CI and how we build. In general this patch accomplishes the following - move build and test scripts into the Citus tree instead of our CI tree. - deduplicate convoluted jobs definition by a couple generic build and test runs - standardized the output - standardized coredumps - made all coredumps and regression diffs available for download A big part of this refactor is in the `the-process` repository. citusdata/the-process#48
This PR rewrites our complete build system for creating and maintaining CI images.
It uses docker layers with better reuse compared to what we used to have. There are still some ways for better reuse. In the future we can move all dockerfiles into 1 with different target names and reuse of common layers like
For now it touched all by the stylechecker.
The
Makefile
included incirceleci\images
contains the postgres versions to currently build for. All scripts install them from the apt archive maintained by pgdg. This should allow for stable builds over time, where we can rebuild older versions with more ease.We have removed the need to create custom debian packages that needed to be uploaded to package cloud. Instead we use multi layer docker builds to compile the specific postgres version and copy over the isolation tester binaries and the vanilla tests for us to run in CI.
By default the Makefile will build images tagged with a
-devYYYYmmddHHMM
suffix for use when changing images. Once changes are approved and landed to master we can create the final images viaRELEASE=1 make push-all
.TODO