-
Notifications
You must be signed in to change notification settings - Fork 149
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
Automate build system #1428
Automate build system #1428
Conversation
96602d8
to
9a13a8c
Compare
952f7f6
to
e81a9e8
Compare
I really like this. Looking at the section used to build multi-version images, we can probably look to extend that a little to additionally specify the alpine version for backwards compatibility
We'd need an elegant way to add an ALPINE_VERSION to correspond to specific PHP/NODE/PYTHON etc versions - this could be part of a different piece of work to pin image versions better and avoid suprises
|
cd47540
to
18de419
Compare
0f1e480
to
5734463
Compare
e083c8f
to
8eb2fbd
Compare
The effective version of the previous build-dep was 7.3
Simplify the build by reusing the same variable name.
* use BASE_VERSION * add versions to pecl extensions, as recommended upstream
Avoid build/* and recursive make.
Use this function and argument to force Alpine 3.10 for python 2.7 builds due to python2 deprecation in Alpine 3.11.
Closing this since I think it's been superseded by https://github.com/uselagoon/lagoon-images |
Checklist
The idea behind this change is that the image names are already encoded in directory names, and build dependencies between images are already defined in the Dockerfiles themselves. So let's parse that information to generate build targets and dependencies automatically, and avoid the error-prone process of manual
Makefile
editing. These generated make rules are then written to.docker.mk
, which isinclude
d in the mainMakefile
. This will generate abuild:<name>
target for each image.Note that this new system doesn't
touch
any files like the existing build system, but docker image caching is pretty fast - a second run ofmake build:all -j$(getconf _NPROCESSORS_ONLN)
takes <20s on my system.Here are the new commands:
Most of these are functionally identical to the targets they replace, but there are a few new ones..
minishift
target is now split intominishift
andminishift/start
. This is done becaues the former actually creates a./minishift
file which is a dependency of other targets. The latter does the actual configuration of minishift for local lagoon development.build:pull
pulls all the base images that lagoon builds on into the local docker image cache, and generates apull-report.json
containing the image names/tags and hashes of these base images. This could be published as a release artefact to make it easier to know exactly which image versions make up a lagoon release.help
(the default target) prints a simple display of the major Makefile commands.I've also made some small changes to simplify the layout of the lagoon images, consolidating Dockerfiles where possible (e.g. php, ELK). The layout could probably be simplified further, which would then allow further simplification of the build scripts.
Changelog Entry
Improvement - automate build system
Closing issues
Closes #981, #1376, #1482, #1499.
Supersedes #982.