build-images.py: Build multiple flavours of each image
Define multiple "flavours" of mediawiki and webserver images and map
each flavour name to a set of Docker build arguments. The currently
defined flavours specify different versions of PHP to be used for
MediaWiki images.
Iterate over the flavours when building images and pass each set of
build arguments to docker_build
. Key the state and report file names
by flavour to avoid collision.
Include entries in the report JSON files for each built flavour as well
as backwards compatible entries for the last flavour built. The latter
may be removed once scap is refactored to support flavours.
For now, the available flavours and build argument mappings are
predefined/hardcoded as constants. Since flavours are not likely to
change often, this seems acceptable. If build-images.py
is integrated
into scap in the future, that would be a good time to adopt something
more configuration, perhaps simply another scap configuration item.
Bug: T370934