[perl PATCH v4 1/3] gitlab: add CI jobs for validating build across platforms
Andrea Bolognani
abologna at redhat.com
Thu May 7 10:04:10 UTC 2020
On Tue, 2020-05-05 at 12:40 +0100, Daniel P. Berrangé wrote:
> +.git_build_job_template: &git_build_job_definition
> + image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
> + stage: builds
> + before_script:
> + - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
> + - export SCRATCH_DIR="/tmp/scratch"
> + - export VROOT="$SCRATCH_DIR/vroot"
> + - export LD_LIBRARY_PATH="$VROOT/lib"
> + - export PATH="$VROOT/bin:$PATH"
> + - export PKG_CONFIG_PATH="$VROOT/lib/pkgconfig"
> + - export TEST_MAINTAINER=1
> + script:
> + - pushd "$PWD"
> + - mkdir -p "$SCRATCH_DIR"
> + - cd "$SCRATCH_DIR"
> + - git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
> + - mkdir libvirt/build
> + - cd libvirt/build
> + - ../autogen.sh --prefix="$VROOT" --without-libvirtd
> + - $MAKE install
> + - popd
> + - perl Build.PL
> + - perl Build
> + - perl Build test
The Jenkins-based CI also runs
perl Build install
and I think we should keep that.
Partially related point: I just realized that, among the projects
we've added to GitLab CI so far, I don't think there's a single one
where we're testing that we can successfully build RPMs. This is
something that CentOS CI does, and I think it's important that we
keep testing it on GitLab CI.
> +centos-7-git-build:
> + <<: *git_build_job_definition
> + variables:
> + NAME: centos-7
> +
> +centos-8-git-build:
> + <<: *git_build_job_definition
> + variables:
> + NAME: centos-8
> +
> +debian-9-git-build:
> + <<: *git_build_job_definition
> + variables:
> + NAME: debian-9
Same question as libvirt-php: why are we not building against
distro-provided libvirt packages?
> +++ b/ci/README.rst
> @@ -0,0 +1,12 @@
> +CI job assets
> +=============
> +
> +This directory contains assets used in the automated CI jobs, most
> +notably the Dockerfiles used to build container images in which the
> +CI jobs then run.
> +
> +The `refresh` script is used to re-create the Dockerfiles using the
> +`lcitool` that is provided by repo `https://gitlab.com/libvirt/libvirt-ci`
> +The containers are built during the CI process and cached in the GitLab
> +container registry of the project doing the build. The cached containers
> +can be deleted at any time and will be correctly rebuilt.
Old version of ci/README.rst.
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list