---
+
+# Jenkins connects to the standalone nodes as the root user
+jenkins_user: false
+
# jenkins connects to standalone nodes as the root user
extra_root_ssh_authorized_keys:
# yamllint disable-line rule:line-length
---
+# This node uses an older linux kernel for u32/u64 integration tests
+# which creates conflicting package dependencies
+#
+cross_compilers_debian_bookworm_snapshot: false
+cross_compilers_install: false
+
netplan_manage: true
netplan_content: |
network:
# While ci-node-sles12sp5-amd64-1b-01 has python 3.4, more recent
# versions of ansible require python 3.5. Therefore python2 is used.
ci-node-sles12sp5-amd64-1b-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2a-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2b-01 ansible_python_interpreter=python2
+ci-node-sles12sp5-amd64-2c-01 ansible_python_interpreter=python2
ci-node-sles15sp4-amd64-1b-01
+ci-node-sles15sp4-amd64-2a-01
+ci-node-sles15sp4-amd64-2b-01
+ci-node-sles15sp4-amd64-2c-01
ci-rootnode-sles15sp4-amd64-1d-01
ci-node-sles15sp5-amd64-1b-01
+ci-node-sles15sp5-amd64-2a-01
+ci-node-sles15sp5-amd64-2b-01
+ci-node-sles15sp5-amd64-2c-01
[node_el]
ci-node-el7-amd64-02-01 ansible_python_interpreter=python2
---
-- hosts: hosts
+- hosts: hosts:!windows
roles:
# Setup filesystem and network configuration before other roles
- zfs
- netplan
+- hosts: hosts
+ roles:
- common
+- hosts: hosts:!windows
+ roles:
- libvirt
- lxd
- rasdaemon
object: "{{item.vm}}"
with_items: "{{containers}}"
- name: Update DNS entries
- when: not skip_dns and inventory_hostname == 'localhost'
+ when: not skip_dns and inventory_hostname == 'localhost' and item.meta|default(false)
with_items: "{{containers}}"
ansible.builtin.command:
argv: [
name: sshd
start_mode: auto
state: started
+- name: Allow Terminal Server connections
+ ansible.windows.win_regedit:
+ path: 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server'
+ name: 'fDenyTSConnections'
+ data: '0'
+ type: 'dword'
+- name: Run RDP automatically
+ ansible.windows.win_service:
+ name: 'TermService'
+ start_mode: 'auto'
+ state: 'started'
- name: Turn off standy
ansible.windows.win_command: 'C:\Windows\system32\powercfg.exe /change standby-timeout-ac 0'
- name: Turn off hibernation
ansible.windows.win_template:
src: 'authorized_keys.j2'
dest: 'c:\ProgramData\ssh\administrators_authorized_keys'
-
+# c.f. https://galaxy.ansible.com/ui/repo/published/community/windows/content/module/win_firewall_rule/
+- name: Firewall rule to alloc ICMP v4 on all type codes
+ community.windows.win_firewall_rule:
+ name: ICMP Allow incoming V4 echo request
+ enabled: true
+ state: present
+ profiles:
+ - domain
+ - private
+ - public
+ action: allow
+ direction: in
+ protocol: icmpv4
+ icmp_type_code: '*'
+- name: Firewall rule to allow RDP on TCP port 3389
+ community.windows.win_firewall_rule:
+ name: Remote Desktop
+ localport: 3389
+ action: allow
+ direction: in
+ protocol: tcp
+ profiles:
+ - domain
+ - private
+ state: present
+ enabled: true
- name: Reboot if domain changed
when: domain_state.reboot_required
ansible.windows.win_reboot:
- clang-13
- clang-14
- clang-15
+ - clang-16
- libclang-dev
- libclang-13-dev
- libclang-14-dev
- libclang-15-dev
+ - libclang-16-dev
- clang-format
- clang-format-13
- clang-format-14
- clang-format-15
+ - clang-format-16
- clang-tidy
- clang-tidy-13
- clang-tidy-14
- clang-tidy-15
+ - clang-tidy-16
- bear
---
compilers_legacy_install: true
cross_compilers_debian_bookworm_snapshot: false
+cross_compilers_install: true
apk: update_cache=yes
- name: Ensure cross-compilers packages are installed.
+ when: cross_compilers_install|default(true)
apk: "name={{ cross_compilers_packages }} state=present"
update_cache: true
- name: Ensure cross-compilers packages are installed.
+ when: cross_compilers_install|default(true)
ansible.builtin.apt:
name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
---
- name: Ensure cross-compilers packages are installed.
+ when: cross_compilers_install|default(true)
dnf:
name: "{{ cross_compilers_packages }}"
state: installed
---
- name: Install virtualization packages
apt:
- name: ['qemu-kvm', 'libvirt-daemon-system', 'python3-libvirt']
+ name: ['qemu-kvm', 'libvirt-daemon-system', 'python3-libvirt', 'python3-lxml']
- name: Run libvirtd
systemd:
name: libvirtd
- libpopt-dev
- libxml2-dev
- shellcheck
+ - systemtap-sdt-dev
lttng_tools_packages_no_recommends:
- asciidoc
- bash-completion
- libxml2-devel
- popt-devel
+ - systemtap-sdt-devel
- xmlto
- bash-completion
- libxml2-devel
- popt-devel
+ - systemtap-sdt-devel
lttng_tools_packages_no_recommends:
- asciidoc
source:
type: image
mode: pull
- server: https://images.linuxcontainers.org
- protocol: simplestreams
- alias: debian/bookworm/cloud/amd64
+ # Until the cluster is migrated to Incus, this source will not work
+ # server: https://images.linuxcontainers.org
+ alias: debian/bookworm/cloud/amd64/ci-node/lxd
wait_for_container: true
- name: Merge defaults
set_fact:
lxd_container_config: "{{lxd_container_defaults|combine(object)}}"
-- name: Manage container
+- name: "Manage container {{lxd_container_config.name|default('Unknown')}}"
community.general.lxd_container: "{{lxd_container_config}}"
- name: community.general
version: '>=5.4.0'
type: galaxy
+ - name: community.windows
+ version: '>=2.2.0'
+ type: galaxy
---
-- name: Connect product using full version
+- name: "Connect product '{{product}}' using full version"
ansible.builtin.command:
- argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
+ argv: ['SUSEConnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
register: connect
ignore_errors: true
# Some products don't use the full version, but only the major version
-- name: Connect production using major version
+- name: "Connect product '{{product}}' using major version"
when: connect.rc != 0
ansible.builtin.command:
- argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_major_version}}/{{ansible_architecture}}"]
+ argv: ['SUSEConnect', '-p', "{{product}}/{{ansible_distribution_major_version}}/{{ansible_architecture}}"]
# zfs create -o mountpoint=/storage/git-mirror tank/lxd/custom/git-mirror
source: /storage/git-mirror
type: disk
- - meta:
- address: 172.18.16.1
- lxd:
- name: ci-node-deb12-amd64-01
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.2
- lxd:
- name: ci-node-deb12-amd64-02
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.3
- lxd:
- name: ci-node-deb12-amd64-03
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.4
- lxd:
- name: ci-node-deb12-amd64-04
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.5
- lxd:
- name: ci-node-deb12-amd64-05
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.6
- lxd:
- name: ci-node-deb12-amd64-06
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.7
- lxd:
- name: ci-node-deb12-amd64-07
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- - meta:
- address: 172.18.16.8
- lxd:
- name: ci-node-deb12-amd64-08
- jenkins:
- label: 'deb12-amd64 deb12'
- mode: EXCLUSIVE
- meta:
address: 172.18.16.9
lxd:
jenkins:
label: 'deb12-i386 deb12'
mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.91
+ lxd:
+ name: ci-node-sles15sp4-amd64-2a-01
+ target: ci-host-amd64-2a
+ source:
+ alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp4-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.92
+ lxd:
+ name: ci-node-sles15sp4-amd64-2b-01
+ target: ci-host-amd64-2b
+ source:
+ alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp4-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.93
+ lxd:
+ name: ci-node-sles15sp4-amd64-2c-01
+ target: ci-host-amd64-2c
+ source:
+ alias: 'sles/15.4/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp4-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.94
+ lxd:
+ name: ci-node-sles15sp5-amd64-2a-01
+ target: ci-host-amd64-2a
+ source:
+ alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp5-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.95
+ lxd:
+ name: ci-node-sles15sp5-amd64-2b-01
+ target: ci-host-amd64-2b
+ source:
+ alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp5-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.96
+ lxd:
+ name: ci-node-sles15sp5-amd64-2c-01
+ target: ci-host-amd64-2c
+ source:
+ alias: 'sles/15.5/cloud/amd64/ci-node/lxd'
+ type: image
+ jenkins:
+ label: 'sles15sp5-amd64'
+ mode: EXCLUSIVE
+ - meta:
+ address: 172.18.16.97
+ jenkins:
+ label: 'sles12sp5-amd64'
+ mode: EXCLUSIVE
+ vm:
+ name: 'ci-node-sles12sp5-amd64-2a-01'
+ disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2a-01.qcow'
+ host: 'ci-host-amd64-2a.internal.efficios.com'
+ - meta:
+ address: 172.18.16.98
+ jenkins:
+ label: 'sles12sp5-amd64'
+ mode: EXCLUSIVE
+ vm:
+ name: 'ci-node-sles12sp5-amd64-2b-01'
+ disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2b-01.qcow'
+ host: 'ci-host-amd64-2b.internal.efficios.com'
+ - meta:
+ address: 172.18.16.99
+ jenkins:
+ label: 'sles12sp5-amd64'
+ mode: EXCLUSIVE
+ vm:
+ name: 'ci-node-sles12sp5-amd64-2c-01'
+ disk: '/var/lib/libvirt/images/ci-node-sles12sp5-amd64-2c-01.qcow'
+ host: 'ci-host-amd64-2c.internal.efficios.com'
# "Root " nodes in libvirt, since Jenkins can use the "libvirt agents" plugin
# to revert to a specific snapshot before running a job
#
publishers:
- archive:
- artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+ artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
allow-empty: false
- workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
publishers:
- workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
- archive:
- artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+ artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
allow-empty: false
- ircbot: *babeltrace_publisher_ircbot_defaults
- email-ext: *babeltrace_publisher_email-ext_defaults
filter: ''
touchstone: ''
warnings_status: FAILED
+ - 'dev_review_babeltrace_{version}_{buildtype}':
+ buildtype: slesbuild
+ platforms: !!python/tuple [sles12sp5-amd64, sles15sp4-amd64, sles15sp5-amd64]
+ builds: !!python/tuple [std]
+ confs: !!python/tuple [std]
+ filter: ''
+ touchstone: ''
+ warnings_status: FAILED
- 'dev_review_babeltrace_{version}_{buildtype}':
version: master
buildtype: winbuild
- string:
name: 'mversion'
default: 'master'
- description: 'The lttng-modules branch to build.'
+ description: 'The lttng-modules branch to build. Use `refs/XXX` for a specific ref, or a commit hash.'
- string:
name: 'mgitrepo'
default: 'git://git-mirror.internal.efficios.com/lttng/lttng-modules.git'
name: 'getsrc_version'
default: 'main'
description: 'The tag or commit to use when cloning the getsrc tool'
+ - bool:
+ name: 'DEBUG'
+ default: false
+ description: "Enable verbose builds"
+ - bool:
+ name: 'FAIL_ON_WARNINGS'
+ default: false
+ description: "Fail the lttng-modules build if there are any warnings"
concurrent: true
fi
if [[ -f tools/format-cpp.sh ]]; then
- FORMATTER="clang-format-15 -i" tools/format-cpp.sh
+ FORMATTER="clang-format-16 -i" tools/format-cpp.sh
git diff --exit-code | tee ../../clang-format.out || exit_code=1
fi
tools/shellcheck.sh | tee ../../shellcheck.out || exit_code=1
fi
+if [[ -f tools/check-include-guards.sh ]]; then
+ tools/check-include-guards.sh | tee ../../check-include-guards.out || exit_code=1
+fi
+
exit $exit_code
make_args=()
DEBUG=${DEBUG:-}
+FAIL_ON_WARNINGS="${FAIL_ON_WARNINGS:-}"
+if [[ "${FAIL_ON_WARNINGS}" == "false" ]] ; then
+ FAIL_ON_WARNINGS=''
+fi
# Derive arch from label if it isn't set
if [ -z "${arch:-}" ] ; then
git_clone_modules_sources() {
mkdir -p "$MODULES_GIT_DIR"
- # If the version starts with "refs/", checkout the specific git ref, otherwise treat it
- # as a branch name.
- if [ "${mversion:0:5}" = "refs/" ]; then
+ # If the version starts with "refs/" or looks like a commit hash,
+ # checkout the specific git ref, otherwise treat it as a branch name.
+ pattern="^[0-9a-f]{40}$"
+ if [ "${mversion:0:5}" = "refs/" ] || [[ "${mversion}" =~ $pattern ]]; then
git clone --no-tags --depth=1 "${mgitrepo}" "$MODULES_GIT_DIR"
(cd "$MODULES_GIT_DIR" && git fetch origin "${mversion}" && git checkout FETCH_HEAD)
else
kversion=$(make -C "$LINUX_HDROBJ_DIR" -s kernelversion)
- # Try to catch some compatibility problems by turning some
- # warnings into errors.
- #export KCFLAGS="$KCFLAGS -Wall -Werror"
-
# Enter lttng-modules source dir
cd "${MODULES_GIT_DIR}"
+ # Try to catch some compatibility problems by turning some
+ # warnings into errors, but only on -rc kernels.
+ pattern="rc[0-9]+$"
+ if [[ "${kversion}" =~ ${pattern} ]] || [[ -n "${FAIL_ON_WARNINGS:-}" ]] ; then
+ export KCFLAGS="${KCFLAGS} -Wall -Werror"
+ # Without the verbose build, the warnings aren't visible.
+ export V=1
+ fi
+
# kernels 3.10 to 3.10.13 and 3.11 to 3.11.2 introduce a deadlock in the
# timekeeping subsystem. We want those build to fail.
if { vergte "$kversion" "3.10" && verlte "$kversion" "3.10.13"; } || \