diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0dea64ff1..a4222e6b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,21 +14,28 @@ stages: - build - test -.ubuntu-before_script: +.ubuntu-common: before_script: - - export DEBIAN_FRONTEND=noninteractive + # Install build-dependencies by loading the package list from the ubuntu/debian cloud-init profile. - apt-get update -qq - - apt-get install --no-install-recommends -y gcc perl liblocale-gettext-perl linux-libc-dev lsb-release make + - apt-get install --yes yq make lsb-release + - | + printf 'include .image-garden.mk\n$(info $(UBUNTU_CLOUD_INIT_USER_DATA_TEMPLATE))\n.PHONY: nothing\nnothing:\n' \ + | make -f - nothing \ + | yq '.packages | .[]' \ + | xargs apt-get install --yes --no-install-recommends + after_script: + # Inspect the kernel and lsb-release. - lsb_release -a - uname -a -.install-c-build-deps: &install-c-build-deps - - apt-get install --no-install-recommends -y build-essential apache2-dev autoconf autoconf-archive automake bison dejagnu flex libpam-dev libtool pkg-config python3-all-dev python3-setuptools ruby-dev swig zlib1g-dev - build-all: stage: build extends: - - .ubuntu-before_script + - .ubuntu-common + script: + # Run the spread prepare section to build everything. + - yq -r '.prepare'