mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
CI: Add .gitlab-ci.yml
This commit is contained in:
parent
606ecae5d7
commit
abdb87dd23
86
.gitlab-ci.yml
Normal file
86
.gitlab-ci.yml
Normal file
@ -0,0 +1,86 @@
|
||||
stages:
|
||||
- approve
|
||||
- test
|
||||
|
||||
approve1:
|
||||
stage: approve
|
||||
script:
|
||||
- echo "Approved..."
|
||||
rules:
|
||||
# TODO: Filter only safe repositories, or user in developers
|
||||
- if: $CI_PROJECT_PATH != "csonto/lvm2" && $CI_PROJECT_PATH != "lvmteam/lvm2"
|
||||
when: manual
|
||||
# TODO: for other branches than main/rhel: run pipeline only when requested:
|
||||
- if: $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH !~ "^rhel.*"
|
||||
when: manual
|
||||
- when: on_success
|
||||
allow_failure: false
|
||||
|
||||
# TODO:
|
||||
# - check results of autoreconf and make generate - may need additional commit
|
||||
# - we need a particular setup (rawhide OR latest supported fedora?)
|
||||
# - do make rpm and publish results as artifacts - we will use packit/COPR for this eventually
|
||||
|
||||
# Run on any commits to main (master), rhel8, rhel9 branches
|
||||
test-job:
|
||||
stage: test
|
||||
parallel:
|
||||
matrix:
|
||||
- TAG: rhel8
|
||||
CONFIGURE: >
|
||||
--with-cluster=internal
|
||||
--enable-cmirrord
|
||||
- TAG: rhel9
|
||||
CONFIGURE: >
|
||||
--with-default-use-devices-file=1
|
||||
--enable-app-machineid
|
||||
--enable-editline
|
||||
--disable-readline
|
||||
artifacts:
|
||||
paths:
|
||||
- test/results/
|
||||
expire_in: 1 week
|
||||
tags:
|
||||
- ${TAG}
|
||||
script:
|
||||
# Common options go here, diffs to the above matrix
|
||||
- >
|
||||
./configure ${CONFIGURE}
|
||||
--enable-fsadm
|
||||
--enable-write_install
|
||||
--enable-pkgconfig
|
||||
--enable-cmdlib
|
||||
--enable-dmeventd
|
||||
--enable-blkid_wiping
|
||||
--enable-udev_sync
|
||||
--with-thin=internal
|
||||
--with-cache=internal
|
||||
--enable-lvmpolld
|
||||
--enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol
|
||||
--enable-lvmlockd-sanlock
|
||||
--enable-dbus-service --enable-notify-dbus
|
||||
--enable-dmfilemapd
|
||||
--with-writecache=internal
|
||||
--with-vdo=internal --with-vdo-format=/usr/bin/vdoformat
|
||||
--with-integrity=internal
|
||||
--disable-silent-rules
|
||||
- make
|
||||
- rm -rf test/results
|
||||
- mkdir -p /dev/shm/lvm2-test
|
||||
- mount -o remount,dev /dev/shm
|
||||
# TODO: Need to distinguish failed test from failed harness
|
||||
# TODO: Also need a way to find if run is incomplete, e.g. full disk resulting in many skipped tests
|
||||
- VERBOSE=0 BATCH=1 LVM_TEST_DIR=/dev/shm/lvm2-test make check || true
|
||||
- rm -rf /dev/shm/lvm2-test
|
||||
- cut -d' ' -f2 test/results/list | sort | uniq -c
|
||||
# Filter artifacts - keep only logs from tests which are not pass
|
||||
- cd test/results && rm $(grep 'passed$' list | cut -d' ' -f1 | sed -e 's|/|_|g' -e 's|.*|\0.txt|')
|
||||
# TODO: Keep a list of known failures, and translate into regexp - or simply use python...
|
||||
- if grep failed test/results/list | grep -v '\\\(dbustest\|lvconvert-mirror\)\.sh' | sort; then false; else true; fi
|
||||
rules:
|
||||
# Filter only safe repositories, or user in developers:
|
||||
# NOTE: Already done in approve stage, may be more caution than necessary
|
||||
- if: $CI_PROJECT_PATH != "csonto/lvm2" && $CI_PROJECT_PATH != "lvmteam/lvm2"
|
||||
when: manual
|
||||
- when: on_success
|
||||
|
Loading…
Reference in New Issue
Block a user