mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
1a29ec8bc9
We previously had a 'rules:' entry that caused a job to be skipped if the variable "TEMPORARILY_DISABLED" was set. This is no longer needed since we can set a similar flag in ci/manifest.yml and re-generate to temporarily skip a job. Unfortunately the 'rules:' entry had an unexpected side-effect on the pipelines that was never previously noticed. Instead of only running pipelines on push, the mere existance of the 'rules:' entry caused triggering of pipelines on merge requests too. The newly auto-generated ci/gitlab.yml file does not have a 'rules:' for the container job template, and thus only runs on git push. The result is that build jobs try to run on merge requests and the container jobs they depend on don't exist. This breaks the entire pipeline with a message that the config is invalid due to broken job dependencies. This fixes a regression introduced in commit ccc7a44adbea003d6a0dc2f156adb2856c28bd4c Author: Daniel P. Berrangé <berrange@redhat.com> Date: Thu Sep 9 14:49:01 2021 +0100 ci: re-generate containers/gitlab config from manifest Reviewed-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
128 lines
4.0 KiB
YAML
128 lines
4.0 KiB
YAML
variables:
|
|
GIT_DEPTH: 100
|
|
|
|
stages:
|
|
- containers
|
|
- builds
|
|
- sanity_checks
|
|
|
|
.script_variables: &script_variables |
|
|
export CCACHE_BASEDIR="$(pwd)"
|
|
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
|
|
export CCACHE_MAXSIZE="500M"
|
|
export PATH="$CCACHE_WRAPPERSDIR:$PATH"
|
|
export VIR_TEST_VERBOSE="1"
|
|
export VIR_TEST_DEBUG="1"
|
|
|
|
include: '/ci/gitlab.yml'
|
|
|
|
.native_build_job:
|
|
extends: .gitlab_native_build_job
|
|
cache:
|
|
paths:
|
|
- ccache/
|
|
key: "$CI_JOB_NAME"
|
|
before_script:
|
|
- *script_variables
|
|
script:
|
|
- meson setup build --werror $MESON_ARGS || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- meson dist -C build --no-tests
|
|
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
|
|
then
|
|
rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz;
|
|
else
|
|
meson compile -C build;
|
|
meson test -C build --no-suite syntax-check --print-errorlogs;
|
|
fi
|
|
|
|
.cross_build_job:
|
|
extends: .gitlab_cross_build_job
|
|
cache:
|
|
paths:
|
|
- ccache/
|
|
key: "$CI_JOB_NAME"
|
|
before_script:
|
|
- *script_variables
|
|
script:
|
|
- meson setup build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- meson compile -C build
|
|
- if test "$CROSS" = "i686" ; then meson test -C build --no-suite syntax-check --print-errorlogs ; fi
|
|
|
|
|
|
# This artifact published by this job is downloaded by libvirt.org to
|
|
# be deployed to the web root:
|
|
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=website
|
|
website:
|
|
stage: builds
|
|
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
|
needs:
|
|
- x86_64-centos-8-container
|
|
before_script:
|
|
- *script_variables
|
|
script:
|
|
- meson setup build --werror --prefix=$(pwd)/vroot || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- ninja -C build install-web
|
|
- mv vroot/share/doc/libvirt/html/ website
|
|
artifacts:
|
|
expose_as: 'Website'
|
|
name: 'website'
|
|
when: on_success
|
|
expire_in: 30 days
|
|
paths:
|
|
- website
|
|
|
|
|
|
codestyle:
|
|
stage: sanity_checks
|
|
image: $CI_REGISTRY_IMAGE/ci-opensuse-leap-152:latest
|
|
needs:
|
|
- x86_64-opensuse-leap-152-container
|
|
before_script:
|
|
- *script_variables
|
|
script:
|
|
- meson setup build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- ninja -C build libvirt-pot-dep
|
|
- meson test -C build --suite syntax-check --no-rebuild --print-errorlogs
|
|
|
|
|
|
# This artifact published by this job is downloaded to push to Weblate
|
|
# for translation usage:
|
|
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=potfile
|
|
potfile:
|
|
stage: builds
|
|
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
|
needs:
|
|
- x86_64-centos-8-container
|
|
rules:
|
|
- if: "$CI_COMMIT_BRANCH == 'master'"
|
|
before_script:
|
|
- *script_variables
|
|
script:
|
|
- meson setup build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- ninja -C build libvirt-pot-dep
|
|
- ninja -C build libvirt-pot
|
|
- cp po/libvirt.pot libvirt.pot
|
|
artifacts:
|
|
expose_as: 'Potfile'
|
|
name: 'potfile'
|
|
when: on_success
|
|
expire_in: 30 days
|
|
paths:
|
|
- libvirt.pot
|
|
|
|
# Coverity job that is run only by schedules
|
|
coverity:
|
|
image: $CI_REGISTRY_IMAGE/ci-centos-8:latest
|
|
needs:
|
|
- x86_64-centos-8-container
|
|
stage: builds
|
|
script:
|
|
- curl https://scan.coverity.com/download/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN -o /tmp/cov-analysis-linux64.tgz
|
|
- tar xfz /tmp/cov-analysis-linux64.tgz
|
|
- meson setup build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
|
|
- cov-analysis-linux64-*/bin/cov-build --dir cov-int meson compile -C build
|
|
- tar cfz cov-int.tar.gz cov-int
|
|
- curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL --form file=@cov-int.tar.gz --form version="$(git describe --tags)" --form description="$(git describe --tags) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
|
|
rules:
|
|
- if: "$CI_PIPELINE_SOURCE == 'schedule' && $COVERITY_SCAN_PROJECT_NAME && $COVERITY_SCAN_TOKEN"
|