ansible: Allow unattended upgrades from Debian backports master
authorKienan Stewart <kstewart@efficios.com>
Thu, 26 Sep 2024 13:25:55 +0000 (09:25 -0400)
committerKienan Stewart <kstewart@efficios.com>
Thu, 26 Sep 2024 13:25:55 +0000 (09:25 -0400)
Change-Id: Ia201cb63c660ab2b11757647af363de83d66043c
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
89 files changed:
AUTHORS [deleted file]
automation/ansible/README.md
automation/ansible/group_vars/node_standalone.yml
automation/ansible/host_vars/ci-host-amd64-1a.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-1b.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-1c.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-1d.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-2a.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-2b.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-2c.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-amd64-2d.internal.efficios.com.yml
automation/ansible/host_vars/ci-host-arm64-2a.internal.efficios.com.yml [new file with mode: 0644]
automation/ansible/host_vars/ci-host-arm64-2b.internal.efficios.com.yml [new file with mode: 0644]
automation/ansible/host_vars/ci-master-04.yml [new file with mode: 0644]
automation/ansible/host_vars/ci-rootnode-deb12-amd64-1c-02.yml
automation/ansible/host_vars/cloud01.internal.efficios.com.yml [new file with mode: 0644]
automation/ansible/host_vars/cloud02.internal.efficios.com.yml [new file with mode: 0644]
automation/ansible/host_vars/cloud03.internal.efficios.com.yml [new file with mode: 0644]
automation/ansible/hosts
automation/ansible/hosts.yml
automation/ansible/node_riscv64.yml
automation/ansible/playbooks/ci-instances.yml
automation/ansible/playbooks/dist-upgrade.yml
automation/ansible/playbooks/snapshot-rootnode.yml
automation/ansible/roles/babeltrace/vars/Debian.yml
automation/ansible/roles/common-node/defaults/main.yml [new file with mode: 0644]
automation/ansible/roles/common-node/tasks/main.yml
automation/ansible/roles/common-node/tasks/setup-Debian.yml
automation/ansible/roles/common-node/tasks/setup-Suse.yml
automation/ansible/roles/common-node/vars/Debian.yml
automation/ansible/roles/common/handlers/main.yml [new file with mode: 0644]
automation/ansible/roles/common/tasks/setup-Debian.yml
automation/ansible/roles/compilers/vars/Debian-12.yml
automation/ansible/roles/compilers/vars/Debian-trixie.yml
automation/ansible/roles/cross-compilers/defaults/main.yml
automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml
automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml
automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml
automation/ansible/roles/cross-compilers/vars/Debian-trixie.yml
automation/ansible/roles/developer/defaults/main.yml
automation/ansible/roles/developer/vars/RedHat.yml
automation/ansible/roles/developer/vars/Suse.yml
automation/ansible/roles/incus/defaults/main.yml [new file with mode: 0644]
automation/ansible/roles/incus/tasks/install.yml [new file with mode: 0644]
automation/ansible/roles/incus/tasks/main.yml [new file with mode: 0644]
automation/ansible/roles/jenkins/defaults/main.yml [new file with mode: 0644]
automation/ansible/roles/jenkins/handlers/main.yml [new file with mode: 0644]
automation/ansible/roles/jenkins/tasks/main.yml [new file with mode: 0644]
automation/ansible/roles/libvirt/tasks/main.yml
automation/ansible/roles/libvirt/templates/vm_template.xml.j2
automation/ansible/roles/libvirt/vars/main.yml
automation/ansible/roles/lttng-modules/vars/Ubuntu-22.yml
automation/ansible/roles/lttng-tools/vars/Debian.yml
automation/ansible/roles/lttng-tools/vars/RedHat.yml
automation/ansible/roles/lttng-tools/vars/Suse.yml
automation/ansible/roles/lttng-ust/tasks/setup-Suse.yml
automation/ansible/roles/lttng-ust/vars/SLES-12.yml
automation/ansible/roles/lxd/defaults/main.yml
automation/ansible/roles/lxd/tasks/container.yml
automation/ansible/roles/lxd/tasks/main.yml
automation/ansible/roles/netplan/defaults/main.yml
automation/ansible/roles/netplan/handlers/main.yml [new file with mode: 0644]
automation/ansible/roles/netplan/tasks/config.yml [new file with mode: 0644]
automation/ansible/roles/netplan/tasks/main.yml
automation/ansible/roles/netplan/templates/netplan.yaml.j2 [new file with mode: 0644]
automation/ansible/roles/suse/tasks/product.yml
automation/ansible/scripts/manage_jenkins_node.py [new file with mode: 0755]
automation/ansible/scripts/update_dns_entry.py
automation/ansible/scripts/update_jenkins_node.py
automation/ansible/site.yml
automation/ansible/vars/ci-instances.yml
jobs/babeltrace.yaml
jobs/images.yml
jobs/librseq.yaml
jobs/liburcu.yaml
jobs/lttng-modules.yaml
jobs/lttng-tools.yaml
jobs/lttng-ust.yaml
pipelines/images/distrobuild.sh
pipelines/images/imagebuild.sh
pyproject.toml [new file with mode: 0644]
scripts/babeltrace/build.sh
scripts/babeltrace/lint.sh
scripts/liburcu/build.sh
scripts/lttng-modules/master.groovy
scripts/lttng-modules/param-build.sh
scripts/lttng-tools/build.sh
scripts/lttng-tools/gerrit-depends-on.sh
scripts/lttng-ust/build.sh

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index c9ba358..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-Michael Jeanson <mjeanson@efficios.com>
-Francis Deslauriers <francis.deslauriers@efficios.com>
index fac4b7ceeb94a704d458159f77582eb2e4e11d81..9bb4328198e865d0e9bcda4f101a5c0e0f2bb007 100644 (file)
@@ -31,9 +31,26 @@ bw sync -f
 ansible-playbook -i hosts [-l SUBSET] site.yaml
 ```
 
 ansible-playbook -i hosts [-l SUBSET] site.yaml
 ```
 
+## Skip slow tasks
+
+`ansible-playbook --skip-tags slow`
+
 # Bootstrapping hosts
 
 # Bootstrapping hosts
 
-## Windows
+## CI host
+
+### Debian
+
+1. Boot host with PXE
+2. Select the option `Debian Bookworm amd64 (CI-host)` or equivalent
+3. Post-preseed verifications:
+  * Check that start-stop-daemon is available in `$PATH`. If not: `touch /sbin/start-stop-daemon; chmod +x /sbin/start-stop-daemon ; apt-get install --reinstall dpkg`
+  * Verify that the ZFS pool `tank` exists on the target host. If not, create it e.g. `zpool create -f tank mirror dev1 dev2`
+4. Add the host to the ansible inventory in the hosts group and in the appropriate cluster group
+5. For LXD hosts, add the host to the `lxd` group
+6. Follow the appropriate LXD or Incus cluster steps
+
+### Windows
 
 1. Configure either SSH or WinRM connection: see https://docs.ansible.com/ansible/latest/os_guide/windows_setup.html
 2. For arm64 hosts:
 
 1. Configure either SSH or WinRM connection: see https://docs.ansible.com/ansible/latest/os_guide/windows_setup.html
 2. For arm64 hosts:
@@ -41,12 +58,14 @@ ansible-playbook -i hosts [-l SUBSET] site.yaml
 
 ## CI 'rootnode'
 
 
 ## CI 'rootnode'
 
-1. Add an entry to the `vms` variable in the host vars for a libvirt host
+1. Add the new ansible node to the `node_standalone` group in the inventory
+2. Add an entry to the `vms` variable in the host vars for the libvirt host
   * See the defaults and details in `roles/libvirt/vars/main.yml` and `roles/libvirt/tasks/main.yml`
   * Make sure to set the `cdrom` key to the path of ISO for the installer
   * See the defaults and details in `roles/libvirt/vars/main.yml` and `roles/libvirt/tasks/main.yml`
   * Make sure to set the `cdrom` key to the path of ISO for the installer
-2. Run the playbook, eg. `ansible-playbook -i hosts -l cloud07.internal.efficios.com site.yml`
+3. Run the playbook, eg. `ansible-playbook -i hosts -l cloud07.internal.efficios.com site.yml`
   * The VM should be created and started
   * The VM should be created and started
-3. Once the VM is installed take a snapshot so that Jenkins may revert to the original state
+4. Once the VM is installed take a snapshot so that Jenkins may revert to the original state
+  * `ansible-playbook playbooks/snapshot-rootnode.yml -e '{"revert_before": false}' -l new-rootnode`
 
 ### Ubuntu auto-installer
 
 
 ### Ubuntu auto-installer
 
@@ -113,13 +132,16 @@ lxc config trust add metrics.crt --type=metrics
 
 ## Adding a new host
 
 
 ## Adding a new host
 
-1. Generate a token for the new member: `lxc cluster add member-host-name`
-2. In the member's host_var's file set the following key:
+2. In the member's host_vars file set the following keys:
+1. On the existing host or cluster, generate a token for the new member: `lxc cluster add member-host-name`
   * `lxd_cluster_ip`: The IP address on which the server will listen
   * `lxd_cluster`: In a fashion similar to the following entry
 ```
 lxd_cluster:
   enabled: true
   * `lxd_cluster_ip`: The IP address on which the server will listen
   * `lxd_cluster`: In a fashion similar to the following entry
 ```
 lxd_cluster:
   enabled: true
+  # Same as the name from the token created above
+  server_name: 'member-host-name'
+  # This shoud match `lxd_cluster_ip`
   server_address: 172.18.0.192
   cluster_token: 'xxx'
   member_config:
   server_address: 172.18.0.192
   cluster_token: 'xxx'
   member_config:
@@ -135,10 +157,19 @@ lxd_cluster:
 
 Local requirements:
 
 
 Local requirements:
 
- * python3, python3-dnspython, samba-tool, kinit
+ * python3, python3-dnspython, python3-jenkins, samba-tool, kinit
 
 To automatically provision instances, perform certain operations, and update DNS entries:
 
 1. Update `vars/ci-instances.yml`
 2. Open a kerberos ticket with `kinit`
 3. Run the playbook, eg. `ansible-playbook playbooks/ci-instances.yml`
 
 To automatically provision instances, perform certain operations, and update DNS entries:
 
 1. Update `vars/ci-instances.yml`
 2. Open a kerberos ticket with `kinit`
 3. Run the playbook, eg. `ansible-playbook playbooks/ci-instances.yml`
+
+# Incus cluster
+
+## Migration from LXD
+
+1. Run the `site.yml` playbook on the hosts to install `incus` and `incus-tools`
+2. On one cluster member, start the `lxd-to-incus` script, and follow the prompts
+3. On each other cluster member, start `lxd-to-incus --cluster-member`
+4. When prompted on each cluster member, uninstall `lxd`.
index d6f5adbb09c2eff1dea7a9452477dcfcd544acec..ab43b4c654a05a2c45355c0203745c07d7c7aadb 100644 (file)
@@ -1,4 +1,8 @@
 ---
 ---
+
+# 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
 # jenkins connects to standalone nodes as the root user
 extra_root_ssh_authorized_keys:
   # yamllint disable-line rule:line-length
index 845cd55ac7ab8aab15039c373faa92ebfe1b02a4..3f2c6751718ad2d407db895f88025c14c364fecc 100644 (file)
@@ -14,12 +14,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:17:fe
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.190/16
         accept-ra: false
         addresses:
           - 172.18.0.190/16
index 3f9b1d6ee22b9148c7f70d0b062b54aef054f7c4..dba1af7db099cb56434522098b8e5e624f87631d 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:18:60
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.191/16
         accept-ra: false
         addresses:
           - 172.18.0.191/16
index 21a89fd11946426ac82c3c53b5b69eb63d713a04..86b5917cc78ffbe71dc29646df065ed3cfd4ef21 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:18:7e
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.192/16
         accept-ra: false
         addresses:
           - 172.18.0.192/16
index f221d63103d91bd86861e31ee48aba870969ef37..f4f88792d3452ff22961a25550b775ad373d07c6 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:17:e6
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.193/16
         accept-ra: false
         addresses:
           - 172.18.0.193/16
index 3b68f9e8e5b58506a8b84ee9e9d1b48df2c00a53..efbdcb5d6513d5786a96501dd8ddbce21cf942d5 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:17:e8
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.194/16
         accept-ra: false
         addresses:
           - 172.18.0.194/16
index 4040c283c8984d05d8afcf0738fec2bf6d65100b..ee013067de9d06df41166a69e99ac3327ec6923e 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:17:e0
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.195/16
         accept-ra: false
         addresses:
           - 172.18.0.195/16
index 3b5be09940da03bfd17129e9e0371b7fb45832ba..396a38799204ea1a81fd0c7974aafd4c0ebb90fb 100644 (file)
@@ -15,12 +15,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:18:5e
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.196/16
         accept-ra: false
         addresses:
           - 172.18.0.196/16
index 542ac22dda2c2bd712cd5c2b2cc3eb7240b482fb..d3ea373743239c2c2b1a61042bdbd852d572bd4b 100644 (file)
@@ -18,12 +18,15 @@ netplan_content: |
     version: 2
     renderer: networkd
     ethernets:
     version: 2
     renderer: networkd
     ethernets:
-      enp5s0f0:
+      eth0:
+        match:
+          macaddress: 7c:c2:55:9f:17:ea
+        set-name: eth0
         dhcp4: no
     bridges:
       br102:
         interfaces:
         dhcp4: no
     bridges:
       br102:
         interfaces:
-          - enp5s0f0
+          - eth0
         accept-ra: false
         addresses:
           - 172.18.0.197/16
         accept-ra: false
         addresses:
           - 172.18.0.197/16
diff --git a/automation/ansible/host_vars/ci-host-arm64-2a.internal.efficios.com.yml b/automation/ansible/host_vars/ci-host-arm64-2a.internal.efficios.com.yml
new file mode 100644 (file)
index 0000000..eb9a6cf
--- /dev/null
@@ -0,0 +1,43 @@
+---
+lxd_cluster_ip: 172.18.0.188
+lxd_cluster:
+  enabled: true
+  server_address: 172.18.0.188
+  #cluster_token:
+  member_config:
+    - entity: storage-pool
+      name: default
+      key: source
+      value: tank/lxd
+netplan_manage: true
+netplan_content: |
+  network:
+    version: 2
+    renderer: networkd
+    ethernets:
+      eth0:
+        match:
+          macaddress: 00:01:73:00:00:01
+        dhcp4: no
+        macaddress: 00:01:73:00:03:01
+      eth1:
+        match:
+          macaddress: 00:01:73:00:00:02
+        dhcp4: no
+        macaddress: 00:01:73:00:03:02
+    bridges:
+      br102:
+        interfaces:
+          - eth0
+        accept-ra: false
+        addresses:
+          - 172.18.0.188/16
+        macaddress: ea:d4:ef:3b:53:5c
+        routes:
+          - to: default
+            via: 172.18.0.1
+        nameservers:
+          search:
+            - internal.efficios.com
+          addresses:
+            - 172.18.0.13
diff --git a/automation/ansible/host_vars/ci-host-arm64-2b.internal.efficios.com.yml b/automation/ansible/host_vars/ci-host-arm64-2b.internal.efficios.com.yml
new file mode 100644 (file)
index 0000000..3666073
--- /dev/null
@@ -0,0 +1,43 @@
+---
+lxd_cluster_ip: 172.18.0.189
+lxd_cluster:
+  enabled: true
+  server_address: 172.18.0.189
+  #cluster_token:
+  member_config:
+    - entity: storage-pool
+      name: default
+      key: source
+      value: tank/lxd
+netplan_manage: true
+netplan_content: |
+  network:
+    version: 2
+    renderer: networkd
+    ethernets:
+      eth0:
+        match:
+          macaddress: 00:01:73:00:00:01
+        dhcp4: no
+        macaddress: 00:01:73:00:04:01
+      eth1:
+        match:
+          macaddress: 00:01:73:00:00:02
+        dhcp4: no
+        macaddress: 00:01:73:00:04:02
+    bridges:
+      br102:
+        interfaces:
+          - eth0
+        accept-ra: false
+        addresses:
+          - 172.18.0.189/16
+        macaddress: 2a:71:0d:6d:a9:1d
+        routes:
+          - to: default
+            via: 172.18.0.1
+        nameservers:
+          search:
+            - internal.efficios.com
+          addresses:
+            - 172.18.0.13
diff --git a/automation/ansible/host_vars/ci-master-04.yml b/automation/ansible/host_vars/ci-master-04.yml
new file mode 100644 (file)
index 0000000..b3b5575
--- /dev/null
@@ -0,0 +1,8 @@
+---
+
+jenkins_systemd_service_override: |
+  [Service]
+  Environment="JAVA_OPTS=-Djava.awt.headless=true -Xmx80G -Dhudson.model.DirectoryBrowserSupport.CSP=\"default-src 'self' 'unsafe-inline';\" -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000 -Dpermissive-script-security.enabled=no_security -Dorg.jenkinsci.plugins.pipeline.modeldefinition.parser.RuntimeASTTransformer.SCRIPT_SPLITTING_TRANSFORMATION=true"
+
+jenkins_url_username: "{{lookup('community.general.bitwarden', '5b6f7c60-26ec-4066-8bd0-b05000de8c24', search='id', field='username')[0]}}"
+jenkins_url_password: "{{lookup('community.general.bitwarden', '5b6f7c60-26ec-4066-8bd0-b05000de8c24', search='id', field='password')[0]}}"
index 2a872070d9f73dae33f9c988df1684be05918a6c..4abe413a9970c82896480eb4836ec35b0a61bbbb 100644 (file)
@@ -1,4 +1,10 @@
 ---
 ---
+# 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:
 netplan_manage: true
 netplan_content: |
   network:
diff --git a/automation/ansible/host_vars/cloud01.internal.efficios.com.yml b/automation/ansible/host_vars/cloud01.internal.efficios.com.yml
new file mode 100644 (file)
index 0000000..1b82cec
--- /dev/null
@@ -0,0 +1,33 @@
+---
+lxd_cluster_ip: 172.18.0.31
+lxd_cluster:
+  server_name: cloud01
+  enabled: true
+  member_config:
+    - entity: storage-pool
+      name: default
+      key: source
+      value: tank/lxd
+netplan_manage: true
+netplan_content: |
+  network:
+    version: 2
+    renderer: networkd
+    ethernets:
+      enp8s0f0:
+        dhcp4: no
+    bridges:
+      br102:
+        interfaces:
+          - enp8s0f0
+        accept-ra: false
+        addresses:
+          - 172.18.0.31/16
+        routes:
+          - to: default
+            via: 172.18.0.1
+        nameservers:
+          search:
+            - internal.efficios.com
+          addresses:
+            - 172.18.0.13
diff --git a/automation/ansible/host_vars/cloud02.internal.efficios.com.yml b/automation/ansible/host_vars/cloud02.internal.efficios.com.yml
new file mode 100644 (file)
index 0000000..fbd259a
--- /dev/null
@@ -0,0 +1,34 @@
+---
+lxd_cluster_ip: 172.18.0.32
+lxd_cluster:
+  server_name: cloud02
+  server_address: 172.18.0.32
+  enabled: true
+  member_config:
+    - entity: storage-pool
+      name: default
+      key: source
+      value: tank/lxd
+netplan_manage: true
+netplan_content: |
+  network:
+    version: 2
+    renderer: networkd
+    ethernets:
+      enp8s0f0:
+        dhcp4: no
+    bridges:
+      br102:
+        interfaces:
+          - enp8s0f0
+        accept-ra: false
+        addresses:
+          - 172.18.0.32/16
+        routes:
+          - to: default
+            via: 172.18.0.1
+        nameservers:
+          search:
+            - internal.efficios.com
+          addresses:
+            - 172.18.0.13
diff --git a/automation/ansible/host_vars/cloud03.internal.efficios.com.yml b/automation/ansible/host_vars/cloud03.internal.efficios.com.yml
new file mode 100644 (file)
index 0000000..90698c4
--- /dev/null
@@ -0,0 +1,35 @@
+---
+lxd_cluster_ip: 172.18.0.33
+lxd_cluster:
+  server_name: cloud03
+  server_address: 172.18.0.33
+  cluster_token: 'eyJzZXJ2ZXJfbmFtZSI6ImNsb3VkMDMiLCJmaW5nZXJwcmludCI6IjdlZTc4NmU1YTk5YjAyOGNhZWM2M2ZmMWM3ZDExNzBjMjFkYTk2NGM2ODZjNjJkNTI4NGMzYTZkYjFkMDFjYjgiLCJhZGRyZXNzZXMiOlsiMTcyLjE4LjAuMzE6ODQ0MyJdLCJzZWNyZXQiOiI3NDI5NWE0OTc4NmIyNjZlYjczMmU4OTg5ODIyYzZiY2EyODFjMmY2YWVhOWEzZGM5OTA4ODc4MGMzZDU5MGEzIiwiZXhwaXJlc19hdCI6IjIwMjQtMDgtMDhUMTE6NDE6MDIuMjI2NTM2MTgtMDQ6MDAifQ=='
+  enabled: true
+  member_config:
+    - entity: storage-pool
+      name: default
+      key: source
+      value: tank/lxd
+netplan_manage: true
+netplan_content: |
+  network:
+    version: 2
+    renderer: networkd
+    ethernets:
+      enp8s0f0:
+        dhcp4: no
+    bridges:
+      br102:
+        interfaces:
+          - enp8s0f0
+        accept-ra: false
+        addresses:
+          - 172.18.0.33/16
+        routes:
+          - to: default
+            via: 172.18.0.1
+        nameservers:
+          search:
+            - internal.efficios.com
+          addresses:
+            - 172.18.0.13
index 5e5b771bfb2317df5bb3f4da083318ff7dc6efe6..51b6328ab1bc55ef8aeca9201c784b4413da5484 100644 (file)
@@ -1,5 +1,8 @@
 localhost ansible_connection=local ansible_python_interpreter=python3
 
 localhost ansible_connection=local ansible_python_interpreter=python3
 
+[jenkins]
+ci-master-04
+
 [hosts]
 ci-host-amd64-1a.internal.efficios.com
 ci-host-amd64-1b.internal.efficios.com
 [hosts]
 ci-host-amd64-1a.internal.efficios.com
 ci-host-amd64-1b.internal.efficios.com
@@ -16,8 +19,12 @@ ci-host-arm64-1a.internal.efficios.com
 ci-host-arm64-1b.internal.efficios.com
 ci-host-arm64-2a.internal.efficios.com
 ci-host-arm64-2b.internal.efficios.com
 ci-host-arm64-1b.internal.efficios.com
 ci-host-arm64-2a.internal.efficios.com
 ci-host-arm64-2b.internal.efficios.com
+# Test cluster
+cloud01.internal.efficios.com
+cloud02.internal.efficios.com
+cloud03.internal.efficios.com
 
 
-[lxd_cluster_ci]
+[cluster_ci]
 ci-host-amd64-1a.internal.efficios.com
 ci-host-amd64-1b.internal.efficios.com
 ci-host-amd64-1c.internal.efficios.com
 ci-host-amd64-1a.internal.efficios.com
 ci-host-amd64-1b.internal.efficios.com
 ci-host-amd64-1c.internal.efficios.com
@@ -26,6 +33,19 @@ ci-host-amd64-2a.internal.efficios.com
 ci-host-amd64-2b.internal.efficios.com
 ci-host-amd64-2c.internal.efficios.com
 ci-host-amd64-2d.internal.efficios.com
 ci-host-amd64-2b.internal.efficios.com
 ci-host-amd64-2c.internal.efficios.com
 ci-host-amd64-2d.internal.efficios.com
+ci-host-arm64-1a.internal.efficios.com
+ci-host-arm64-1b.internal.efficios.com
+ci-host-arm64-2a.internal.efficios.com
+ci-host-arm64-2b.internal.efficios.com
+
+[cluster_ci_dev]
+cloud01.internal.efficios.com
+cloud02.internal.efficios.com
+cloud03.internal.efficios.com
+
+[incus:children]
+cluster_ci_dev
+cluster_ci
 
 [windows]
 ci-host-win11-arm64-01.internal.efficios.com
 
 [windows]
 ci-host-win11-arm64-01.internal.efficios.com
@@ -41,10 +61,6 @@ ci-node-deb12-armhf-01
 ci-node-deb12-armhf-02
 ci-node-deb12-armhf-03
 ci-node-deb12-armhf-04
 ci-node-deb12-armhf-02
 ci-node-deb12-armhf-03
 ci-node-deb12-armhf-04
-ci-node-deb12-armhf-05
-ci-node-deb12-armhf-06
-ci-node-deb12-armhf-07
-ci-node-deb12-armhf-08
 ci-node-deb12-armhf-1a-01
 ci-node-deb12-armhf-1b-01
 ci-node-deb12-armhf-2a-01
 ci-node-deb12-armhf-1a-01
 ci-node-deb12-armhf-1b-01
 ci-node-deb12-armhf-2a-01
@@ -71,7 +87,10 @@ ci-node-deb12-ppc64el-01
 ci-node-deb12-ppc64el-02
 
 [node_riscv64]
 ci-node-deb12-ppc64el-02
 
 [node_riscv64]
-172.16.0.138
+ci-node-deb13-riscv64-01
+ci-node-deb13-riscv64-02
+ci-node-deb13-riscv64-03
+ci-node-deb13-riscv64-04
 
 [node_i386]
 ci-node-deb12-i386-1a-01
 
 [node_i386]
 ci-node-deb12-i386-1a-01
@@ -196,15 +215,22 @@ ci-rootnode-el8-amd64-1d-01
 # 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
 # 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-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-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]
 
 [node_el]
-ci-node-el7-amd64-02-01 ansible_python_interpreter=python2
 ci-node-el8-amd64-03-01
 ci-node-el9-amd64-02-01
 ci-node-el8-amd64-03-01
 ci-node-el9-amd64-02-01
-ci-node-el7-arm64-01
 ci-node-el8-arm64-01
 ci-node-el9-arm64-01
 ci-rootnode-el8-amd64-1d-01
 ci-node-el8-arm64-01
 ci-node-el9-arm64-01
 ci-rootnode-el8-amd64-1d-01
index 1cb9dd06bc2770b4129c8ffc40e77c78f365b3f8..702e43ee0ad655cdbce375c7cc7d266042b80324 100644 (file)
@@ -7,8 +7,17 @@
 - hosts: hosts
   roles:
     - common
 - hosts: hosts
   roles:
     - common
+- hosts: hosts:&lxd:!windows
+  roles:
+    - lxd
+  tasks:
+    - ansible.builtin.include_role:
+        name: incus
+        tasks_from: install
+- hosts: hosts:&incus:!windows
+  roles:
+    - incus
 - hosts: hosts:!windows
   roles:
     - libvirt
 - hosts: hosts:!windows
   roles:
     - libvirt
-    - lxd
     - rasdaemon
     - rasdaemon
index a7c23f98f6db97c5fa93a26ff7592cf34d909927..0ca4790caca50820a88af34ae5bce1d488704c44 100644 (file)
@@ -7,4 +7,3 @@
     - liburcu
     - lttng-ust
     - lttng-tools
     - liburcu
     - lttng-ust
     - lttng-tools
-    - binutils-gdb
index 1259a7a724d71c282032badb465cb662f2f6e1a9..4bde01c19eb960c314b187290fc8a2d568835e15 100644 (file)
@@ -1,5 +1,5 @@
 ---
 ---
-- hosts: lxd_cluster_ci:localhost
+- hosts: cluster_ci:localhost
   vars_files:
     - ../vars/ci-instances.yml
     - ../roles/lxd/defaults/main.yml
   vars_files:
     - ../vars/ci-instances.yml
     - ../roles/lxd/defaults/main.yml
@@ -36,7 +36,7 @@
         object: "{{item.vm}}"
       with_items: "{{containers}}"
     - name: Update DNS entries
         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: [
       with_items: "{{containers}}"
       ansible.builtin.command:
         argv: [
index 57d011da6942571aeaddf00591096829b3fa341e..9d01aa16126d174c9e9745daf9c809e9731b7fa3 100644 (file)
@@ -1,5 +1,5 @@
 ---
 ---
-- name: Dist upgrade and optional reboot
+- name: "Dist upgrade and optional reboot"
   hosts: all
   vars:
     restart: 'no'
   hosts: all
   vars:
     restart: 'no'
     private: no
 
   tasks:
     private: no
 
   tasks:
-   - name: apt-get update
-     apt: update_cache=yes cache_valid_time=3600
+   - name: "apt update && apt dist-upgrade && apt clean && apt autoremove --purge"
+     ansible.builtin.apt:
+       update_cache: yes
+       cache_valid_time: 3600
+       upgrade: dist
+       clean: yes
+       autoremove: yes
+       purge: yes
 
 
-   - name: apt-get dist-upgrade
-     apt: upgrade=dist
-
-   - name: apt-get autoremove
-     command:
-       cmd: apt-get -y --purge autoremove
-       warn: false
-     register: autoremove_output
-     changed_when: "'The following packages will be REMOVED' in autoremove_output.stdout"
-
-   - name: reboot server
+   - name: "Reboot server"
      command: /sbin/reboot
      async: 0
      poll: 0
      command: /sbin/reboot
      async: 0
      poll: 0
index 9b17bc7f68b9b62ae1c96143a0468ac80143b29a..91809a710f0b348452f1724933a262dd91b46250 100644 (file)
@@ -1,22 +1,52 @@
 ---
 ---
-- hosts: localhost
+# To run this play: ansible-playbook playbooks/snapshot-rootnode.yml -l node_standalone
+- name: Initialize cross play variables
+  hosts: node_standalone
   vars:
   vars:
-    # Useful for taking the first snapshot of a new rootnode
+    - job_wait_to_end: true
+    - job_abort: false
+    # Set to false when taking the first snapshot of a new rootnode
     - revert_before: true
     - revert_before: true
-  vars_prompt:
-    - name: target_rootnode
-      private: false
-    - name: rootnode_host
-      private: false
-    - name: snapshot_name
-      default: 'base-configuration'
-      private: false
-  vars_files:
-    - ../vars/ci-instances.yml
+    - snapshot_name: 'base-configuration'
+    - wait_for_changes: true
   tasks:
   tasks:
-    # - Set a maintenance on the jenkins node
-    # - Wait until the task is done
-    # - Maybe interrupt the jenkins tasks
+    - ansible.builtin.set_fact:
+        job_wait_to_end: "{{job_wait_to_end}}"
+        job_abort: "{{job_abort}}"
+        revert_before: "{{revert_before}}"
+        snapshot_name: "{{snapshot_name}}"
+        target_rootnode: "{{inventory_hostname}}"
+        wait_for_changes: "{{wait_for_changes}}"
+
+- name: Shutdown and revert
+  hosts: node_standalone
+  tasks:
+    - name: "Find {{target_rootnode}}'s host"
+      ansible.builtin.command:
+        argv: "{{command_args|list}}"
+      register: get_hypervisor
+      vars:
+        command_args:
+          - '../scripts/manage_jenkins_node.py'
+          - 'get_hypervisor'
+          - "{{target_rootnode}}"
+      delegate_to: localhost
+    - ansible.builtin.set_fact:
+        rootnode_host: "{{get_hypervisor.stdout|trim}}"
+    - name: Disable {{target_rootnode}} in Jenkins
+      ansible.builtin.command:
+        argv: "{{command_args | reject('equalto', '') | list}}"
+      vars:
+        command_args:
+          - '../scripts/manage_jenkins_node.py'
+          - 'disable'
+          - '--wait'
+          - "{{ 0 if job_wait_to_end else -1}}"
+          - "{{target_rootnode}}"
+          - "{{'--force-abort' if job_abort else ''}}"
+          - '--reason'
+          - 'Ansible play: snapshot rootnode'
+      delegate_to: localhost
     - name: Revert target rootnode
       when: revert_before
       ansible.builtin.command:
     - name: Revert target rootnode
       when: revert_before
       ansible.builtin.command:
                     delay=1
                     timeout=300
                     state=started
                     delay=1
                     timeout=300
                     state=started
+
+# If the playbook isn't run with `-l node_standalone` or `-l ci-rootnode...`, then
+# this play errors out trying to find variables for the ci-hosts even if the condition
+# `inventory_hostname in groups.node_standalone` is false.
+- name: Run site.yml
+  import_playbook: '../site.yml'
+  when: inventory_hostname in groups.node_standalone
+
+- name: Cleanup and snapshot
+  hosts: node_standalone
+  tasks:
+    - ansible.builtin.debug:
+        msg: "Example playbook command: `ansible-playbook site.yml -l {{target_rootnode}}`"
+      when: wait_for_changes
+      delegate_to: localhost
     - ansible.builtin.pause:
         prompt: "Run any playbooks or make other changes against {{target_rootnode}} then hit enter when ready to continue (Ctrl-C to abort)"
     - ansible.builtin.pause:
         prompt: "Run any playbooks or make other changes against {{target_rootnode}} then hit enter when ready to continue (Ctrl-C to abort)"
+      when: wait_for_changes
+      delegate_to: localhost
     - name: Remove the jenkins workspace
       ansible.builtin.file:
         path: "{{item}}"
     - name: Remove the jenkins workspace
       ansible.builtin.file:
         path: "{{item}}"
@@ -37,7 +84,6 @@
       with_items:
         - /root/workspace
         - /home/jenkins/workspace
       with_items:
         - /root/workspace
         - /home/jenkins/workspace
-      delegate_to: "{{target_rootnode}}"
     - name: Stop the VM
       ansible.builtin.command:
         argv: ['virsh', 'destroy', "{{target_rootnode}}"]
     - name: Stop the VM
       ansible.builtin.command:
         argv: ['virsh', 'destroy', "{{target_rootnode}}"]
       ansible.builtin.command:
         argv: ['virsh', 'start', "{{target_rootnode}}"]
       delegate_to: "{{rootnode_host}}"
       ansible.builtin.command:
         argv: ['virsh', 'start', "{{target_rootnode}}"]
       delegate_to: "{{rootnode_host}}"
-    # - Remove maintenance on the jenkins node
+    - name: Enable {{target_rootnode}} in Jenkins
+      ansible.builtin.command:
+        argv: "{{command_args | list}}"
+      vars:
+        command_args:
+          - '../scripts/manage_jenkins_node.py'
+          - 'enable'
+          - "{{target_rootnode}}"
+      delegate_to: localhost
index 76ae91262dda2cf05fd15b07f725854d7192fba7..a5ede24146e49bd9f6cca7e4e3d81715ce826363 100644 (file)
@@ -8,6 +8,7 @@ babeltrace_packages:
   - libpopt-dev
   - python3-dev
   - python3-sphinx
   - libpopt-dev
   - python3-dev
   - python3-sphinx
+  - python3-setuptools
   - shellcheck
   - swig
   - uuid-dev
   - shellcheck
   - swig
   - uuid-dev
diff --git a/automation/ansible/roles/common-node/defaults/main.yml b/automation/ansible/roles/common-node/defaults/main.yml
new file mode 100644 (file)
index 0000000..45de103
--- /dev/null
@@ -0,0 +1,3 @@
+---
+
+common_node_core_pattern: "/tmp/core.%p"
index 0fddb5af5988dc8dbb5731f2f6c49e2be49a1baa..c55884da752f52c1dfed78e18a132d399f2646ab 100644 (file)
@@ -8,6 +8,24 @@
     - "{{ ansible_distribution }}.yml"
     - "{{ ansible_os_family }}.yml"
 
     - "{{ ansible_distribution }}.yml"
     - "{{ ansible_os_family }}.yml"
 
+- when: ansible_virtualization_role == "host" or (ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm")
+  block:
+    - name: 'Set core pattern for reboot'
+      ansible.builtin.copy:
+        dest: '/etc/sysctl.d/10-core_pattern.conf'
+        owner: 'root'
+        group: 'root'
+        mode: '0644'
+        content: "kernel.core_pattern /tmp/core.%p\n"
+    - name: 'Check current core pattern'
+      ansible.builtin.command:
+        argv: ['cat', '/proc/sys/kernel/core_pattern']
+      register: current_core_pattern
+    - name: 'Update current core pattern'
+      when: current_core_pattern.stdout|trim != common_node_core_pattern
+      ansible.builtin.command:
+        argv: ['sysctl', '-w', "kernel.core_pattern='{{common_node_core_pattern}}'"]
+
 # Setup/install tasks.
 - ansible.builtin.include_tasks: setup-RedHat.yml
   when: ansible_os_family in ['RedHat', 'Rocky']
 # Setup/install tasks.
 - ansible.builtin.include_tasks: setup-RedHat.yml
   when: ansible_os_family in ['RedHat', 'Rocky']
index 0c45d6b05228d1e427c0e9f366a97590660c0910..fdca8507ecea527e904372c2961c35f4974723e3 100644 (file)
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Debian'
       apt:
         name: ['linux-headers-amd64']
       when: ansible_architecture == 'x86_64' and ansible_distribution == 'Debian'
       apt:
         name: ['linux-headers-amd64']
+    - name: Install armhf linux headers Debian
+      when: ansible_architecture == 'armv7l' and ansible_distribution == 'Debian'
+      apt:
+        name: ['linux-headers-armmp-lpae']
+    - name: Install arm64 linux headers Debian
+      when: ansible_architecture == 'aarch64' and ansible_distribution == 'Debian'
+      apt:
+        name: ['linux-headers-arm64']
     - name: Install linux headers Ubuntu
       when: ansible_distribution == 'Ubuntu'
       apt:
     - name: Install linux headers Ubuntu
       when: ansible_distribution == 'Ubuntu'
       apt:
index 801dede9009216f33e94b2f0804fa12efd8964c4..d9a531682faf228627cd2c8af1b0e4a17a519f09 100644 (file)
         dest: '/opt/apache/maven'
         state: 'link'
         src: '/opt/apache/apache-maven-3.9.6'
         dest: '/opt/apache/maven'
         state: 'link'
         src: '/opt/apache/apache-maven-3.9.6'
+
+- name: Set default java runtime
+  when: ansible_distribution_major_version == "12"
+  community.general.alternatives:
+    name: java
+    path: "/usr/lib64/jvm/jre-11-openjdk/bin/java"
+
+- name: Deactivate firewalld
+  ansible.builtin.service:
+    name: firewalld
+    enabled: false
+    state: stopped
+  # The package may be not installed by default on some versions,
+  # or it was manually purged.
+  ignore_errors: true
index 24250ffccccbb816e8d4f504b0bce348ee66868a..9bd98ddc65876abf858cbaec90e0a4cef844aeb0 100644 (file)
@@ -8,7 +8,7 @@ common_node_packages:
   - clang-tools
   - cloc
   - curl
   - clang-tools
   - cloc
   - curl
-  - default-jdk-headless
+  - openjdk-17-jdk-headless
   - emacs-nox
   - flex
   - gettext
   - emacs-nox
   - flex
   - gettext
diff --git a/automation/ansible/roles/common/handlers/main.yml b/automation/ansible/roles/common/handlers/main.yml
new file mode 100644 (file)
index 0000000..a497c38
--- /dev/null
@@ -0,0 +1,5 @@
+---
+
+- name: 'apt update'
+  ansible.builtin.command:
+    argv: ['apt', 'update']
index 80faa0a17a9aeaba447bc25c9bb447d98acb75ab..b71ca6e27a838705d063bb8cafc088416d06e586 100644 (file)
@@ -39,7 +39,7 @@
       - "${distro_id}:${distro_codename}-backports"
     repos_Ubuntu:
       - "LP-PPA-efficios-ci:${distro_codename}"
       - "${distro_id}:${distro_codename}-backports"
     repos_Ubuntu:
       - "LP-PPA-efficios-ci:${distro_codename}"
-    repose_Debian: []
+    repos_Debian: []
     repos: "{{repos_base|union(lookup('vars', 'repos_' + ansible_distribution, default=[]))}}"
 
 - name: Enable unattended upgrades
     repos: "{{repos_base|union(lookup('vars', 'repos_' + ansible_distribution, default=[]))}}"
 
 - name: Enable unattended upgrades
index 4c6c41ffb5103609573d6b46e92b51313d9e9c59..8e0ac5db3d926f4e56aa94036e77f3d9214fc4f4 100644 (file)
@@ -10,16 +10,20 @@ compilers_packages:
   - clang-13
   - clang-14
   - clang-15
   - clang-13
   - clang-14
   - clang-15
+  - clang-16
   - libclang-dev
   - libclang-13-dev
   - libclang-14-dev
   - libclang-15-dev
   - 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
   - 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
   - clang-tidy-13
   - clang-tidy-14
   - clang-tidy-15
+  - clang-tidy-16
   - bear
   - bear
index b5e035ecb5c05236169025c985e2c4c709b08cf5..a27c7f52e97b3c13dc11bc42a45b8387e5763432 100644 (file)
@@ -4,24 +4,26 @@ compilers_packages:
   - gcc-11
   - gcc-12
   - gcc-13
   - gcc-11
   - gcc-12
   - gcc-13
+  - gcc-14
   - g++
   - g++-11
   - g++-12
   - g++-13
   - g++
   - g++-11
   - g++-12
   - g++-13
+  - g++-14
   - clang
   - clang
-  - clang-14
   - clang-15
   - clang-16
   - clang-15
   - clang-16
+  - clang-17
   - libclang-dev
   - libclang-dev
-  - libclang-14-dev
   - libclang-15-dev
   - libclang-16-dev
   - libclang-15-dev
   - libclang-16-dev
+  - libclang-17-dev
   - clang-format
   - clang-format
-  - clang-format-14
   - clang-format-15
   - clang-format-16
   - clang-format-15
   - clang-format-16
+  - clang-format-17
   - clang-tidy
   - clang-tidy
-  - clang-tidy-14
   - clang-tidy-15
   - clang-tidy-16
   - clang-tidy-15
   - clang-tidy-16
+  - clang-tidy-17
   - bear
   - bear
index d50918bc1b74f231fe293121b702071099347d33..0123d7bf36c3903a3730a6a0d75136f9c8e3354e 100644 (file)
@@ -1,3 +1,4 @@
 ---
 compilers_legacy_install: true
 cross_compilers_debian_bookworm_snapshot: false
 ---
 compilers_legacy_install: true
 cross_compilers_debian_bookworm_snapshot: false
+cross_compilers_install: true
index 64f96daf68767081c2cd1d9a547d7913ad27244e..a2162313de0d094875c30d640291c9c21e8da041 100644 (file)
@@ -3,4 +3,5 @@
   apk: update_cache=yes
 
 - name: Ensure cross-compilers packages are installed.
   apk: update_cache=yes
 
 - name: Ensure cross-compilers packages are installed.
+  when: cross_compilers_install|default(true)
   apk: "name={{ cross_compilers_packages }} state=present"
   apk: "name={{ cross_compilers_packages }} state=present"
index 95173f243d5e72196c3d5e3a214d678507e8556d..95add22384109a7e115861d25d48a8f0a7d0ae07 100644 (file)
@@ -16,6 +16,7 @@
         update_cache: true
 
 - name: Ensure cross-compilers packages are installed.
         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=[]))}}"
 
   ansible.builtin.apt:
     name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
 
index c8429d20a37f2e9a1fd1f47424f46f36d9868583..dd410757309848010c89653425adf2f63fed87f3 100644 (file)
@@ -1,5 +1,6 @@
 ---
 - name: Ensure cross-compilers packages are installed.
 ---
 - name: Ensure cross-compilers packages are installed.
+  when: cross_compilers_install|default(true)
   dnf:
     name: "{{ cross_compilers_packages }}"
     state: installed
   dnf:
     name: "{{ cross_compilers_packages }}"
     state: installed
index 12311b93d30b6c5bde14c916eca777f30124e8d8..314f0bf86eba4acdfe2d0793a2108a760e6fb1a8 100644 (file)
@@ -8,6 +8,14 @@ cross_compilers_packages:
   - gcc-riscv64-linux-gnu
   - gcc-s390x-linux-gnu
 
   - gcc-riscv64-linux-gnu
   - gcc-s390x-linux-gnu
 
+  - gcc-14-aarch64-linux-gnu
+  - gcc-14-arm-linux-gnueabihf
+  - gcc-14-i686-linux-gnu
+  - gcc-14-powerpc64le-linux-gnu
+  - gcc-14-powerpc-linux-gnu
+  - gcc-14-riscv64-linux-gnu
+  - gcc-14-s390x-linux-gnu
+
   - gcc-13-aarch64-linux-gnu
   - gcc-13-arm-linux-gnueabihf
   - gcc-13-i686-linux-gnu
   - gcc-13-aarch64-linux-gnu
   - gcc-13-arm-linux-gnueabihf
   - gcc-13-i686-linux-gnu
@@ -34,6 +42,7 @@ cross_compilers_packages:
 
 cross_compilers_packages_exclude_i386:
   - gcc-i686-linux-gnu
 
 cross_compilers_packages_exclude_i386:
   - gcc-i686-linux-gnu
+  - gcc-14-i686-linux-gnu
   - gcc-13-i686-linux-gnu
   - gcc-12-i686-linux-gnu
   - gcc-11-i686-linux-gnu
   - gcc-13-i686-linux-gnu
   - gcc-12-i686-linux-gnu
   - gcc-11-i686-linux-gnu
index 3acb9473d1912656795a5bc9d79435b017400673..7d6cfe9c828512a13542d90b3f37f65a0abde9f6 100644 (file)
@@ -8,7 +8,10 @@ developer_tui_packages:
   - bzip2
   - emacs-nox
   - gdb
   - bzip2
   - emacs-nox
   - gdb
+  - git-review
+  - npm  # For working on web sites
   - pkg-config
   - pkg-config
+  - ruby-bundler  # For working on web sites
   - tmux
   - vim-nox
   # wget may be used by some vlttng commands
   - tmux
   - vim-nox
   # wget may be used by some vlttng commands
index b799f389d4154cf1b28ff20babdd458a733610bd..86d45907d50cf1082deac150c8004820837b4028 100644 (file)
@@ -4,6 +4,7 @@ developer_tui_packages:
   - bzip2
   - emacs-nox
   - gdb
   - bzip2
   - emacs-nox
   - gdb
+  - git-review
   - pkg-config
   - tmux
   # - vim-nox
   - pkg-config
   - tmux
   # - vim-nox
index 933d8ef891bfd9fe864a2ebe53932f372aaa7703..75964ac973b9fb4865f18e79ff05f1c50eedbb4b 100644 (file)
@@ -4,6 +4,7 @@ developer_tui_packages:
   - bzip2
   - emacs-nox
   - gdb
   - bzip2
   - emacs-nox
   - gdb
+  # - git-review
   - pkg-config
   - tmux
   # - vim-nox
   - pkg-config
   - tmux
   # - vim-nox
diff --git a/automation/ansible/roles/incus/defaults/main.yml b/automation/ansible/roles/incus/defaults/main.yml
new file mode 100644 (file)
index 0000000..a3f17bc
--- /dev/null
@@ -0,0 +1,3 @@
+---
+
+incus_core_pattern: '/tmp/core-%p'
diff --git a/automation/ansible/roles/incus/tasks/install.yml b/automation/ansible/roles/incus/tasks/install.yml
new file mode 100644 (file)
index 0000000..8889f0f
--- /dev/null
@@ -0,0 +1,21 @@
+---
+
+- name: Configure bookworm-backports
+  when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '12'
+  block:
+    - ansible.builtin.apt_repository:
+        repo: 'deb https://deb.debian.org/debian bookworm-backports main contrib non-free-firmware'
+    - ansible.builtin.copy:
+        content: "Unattended-Upgrade::Origins-Pattern:: \"origin=Debian Backports,codename=${distro_codename}-backports,label=Debian Backports\";\n"
+        dest: '/etc/apt/apt.conf.d/90unattended_upgrades-backports.conf'
+        owner: 'root'
+        group: 'root'
+        mode: '0644'
+      notify:
+        - 'apt update'
+
+- name: Install packages
+  ansible.builtin.package:
+    name:
+      - incus
+      - incus-tools
diff --git a/automation/ansible/roles/incus/tasks/main.yml b/automation/ansible/roles/incus/tasks/main.yml
new file mode 100644 (file)
index 0000000..10e77a1
--- /dev/null
@@ -0,0 +1,49 @@
+---
+
+- ansible.builtin.include_tasks:
+    file: install.yml
+
+# The core pattern is used by the CI containers
+- when: ansible_virtualization_role == "host" or (ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm")
+  block:
+    - name: 'Set core pattern for reboot'
+      ansible.builtin.copy:
+        dest: '/etc/sysctl.d/10-core_pattern.conf'
+        owner: 'root'
+        group: 'root'
+        mode: '0644'
+        content: "kernel.core_pattern /tmp/core.%p\n"
+    - name: 'Check current core pattern'
+      ansible.builtin.command:
+        argv: ['cat', '/proc/sys/kernel/core_pattern']
+      register: current_core_pattern
+    - name: 'Update current core pattern'
+      when: current_core_pattern.stdout|trim != "'{{incus_core_pattern}}'"
+      ansible.builtin.command:
+        argv: ['sysctl', '-w', "kernel.core_pattern='{{incus_core_pattern}}'"]
+
+- name: Check for images volume configuration
+  ansible.builtin.command:
+    argv: ['incus', 'config', "--target={{lxd_cluster['server_name']|default(ansible_hostname)}}", 'get', 'storage.images_volume']
+  register: images_volume_conf
+- name: Configure images volume
+  when: images_volume_conf.stdout|trim != "default/storage-images"
+  block:
+    - name: Create volume
+      ansible.builtin.command:
+        argv: ['incus', 'storage', 'volume', 'create', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'default', 'storage-images']
+    - ansible.builtin.command:
+        argv: ['incus', 'config', 'set', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'storage.images_volume', 'default/storage-images']
+
+- name: Check for backups volume configuration
+  ansible.builtin.command:
+    argv: ['incus', 'config', "--target={{lxd_cluster['server_name']|default(ansible_hostname)}}", 'get', 'storage.backups_volume']
+  register: backups_volume_conf
+- name: Configure backups volume
+  when: backups_volume_conf.stdout|trim != "default/storage-backups"
+  block:
+    - name: Create volume
+      ansible.builtin.command:
+        argv: ['incus', 'storage', 'volume', 'create', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'default', 'storage-backups']
+    - ansible.builtin.command:
+        argv: ['incus', 'config', 'set', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'storage.backups_volume', 'default/storage-backups']
diff --git a/automation/ansible/roles/jenkins/defaults/main.yml b/automation/ansible/roles/jenkins/defaults/main.yml
new file mode 100644 (file)
index 0000000..636914f
--- /dev/null
@@ -0,0 +1,79 @@
+---
+
+jenkins_lts: true
+jenkins_dependencies:
+  - fontconfig
+  - openjdk-17-jre
+jenkins_plugins:
+  - active-directory
+  - ansicolor
+  - authentication-tokens
+  - build-keeper-plugin
+  - build-timeout
+  - checks-api
+  - command-launcher
+  - conditional-buildstep
+  - config-file-provider
+  - copyartifact
+  - coverage
+  - credentials
+  - dark-theme
+  - dashboard-view
+  - email-ext
+  - envinject
+  - environment-script
+  - excludeMatrixParent
+  - extended-read-permission
+  - external-monitor-job
+  - gerrit-checks-api
+  - git
+  - git-server
+  - github
+  - github-api
+  - groovy
+  - htmlpublisher
+  - image-gallery
+  - instance-identity
+  - ircbot
+  - javax-mail-api
+  - jdk-tool
+  - jobConfigHistory
+  - job-dsl
+  - junit
+  - ldap
+  - libvirt-slave
+  - mapdb-api
+  - matrix-project
+  - metrics
+  - monitoring
+  - parameterized-trigger
+  - permissive-script-security
+  - pipeline-github-lib
+  - pipeline-graph-view
+  - 'pipeline-groovy-lib'   # Replaces workflow-cps
+  - pipeline-model-definition
+  - pipeline-rest-api
+  - pipeline-utility-steps
+  - plot
+  - postbuildscript
+  - PrioritySorter
+  - proc-cleaner-plugin
+  - prometheus
+  - promoted-builds
+  - publish-over-ssh
+  - purge-build-queue-plugin
+  - script-security
+  - simple-theme-plugin
+  - solarized-theme
+  - ssh-slaves
+  - tap
+  - throttle-concurrents
+  - timestamper
+  - versioncolumn
+  - warnings-ng
+  - workflow-aggregator
+  - workflow-api
+  - workflow-basic-steps
+  - workflow-job
+  - ws-cleanup
+jenkins_restart_on_change: false
diff --git a/automation/ansible/roles/jenkins/handlers/main.yml b/automation/ansible/roles/jenkins/handlers/main.yml
new file mode 100644 (file)
index 0000000..7ac012c
--- /dev/null
@@ -0,0 +1,15 @@
+---
+- name: Systemd daemon-reload
+  ansible.builtin.systemd:
+    daemon_reload: true
+
+- name: Request Jenkins restart
+  when: jenkins_restart_on_change|default(false)
+  community.general.jenkins_script:
+    script: |
+      import jenkins.model.*
+      Jenkins.instance.safeRestart("Changes during Ansible run")
+    url: "{{jenkins_url|default('http://localhost:8080')}}"
+    user: "{{jenkins_url_username|default(lookup('community.general.bitwarden', '5b6f7c60-26ec-4066-8bd0-b05000de8c24', search='id', field='username')[0])}}"
+    password: "{{jenkins_url_password|default(lookup('community.general.bitwarden', '5b6f7c60-26ec-4066-8bd0-b05000de8c24', search='id', field='password')[0])}}"
+
diff --git a/automation/ansible/roles/jenkins/tasks/main.yml b/automation/ansible/roles/jenkins/tasks/main.yml
new file mode 100644 (file)
index 0000000..cd64981
--- /dev/null
@@ -0,0 +1,51 @@
+---
+
+- name: Install Jenkins keyring
+  ansible.builtin.get_url:
+    url: 'https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key'
+    dest: '/usr/share/keyrings/jenkins-keyring.asc'
+- name: Add Jenkins stable apt repository
+  ansible.builtin.apt_repository:
+    repo: "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian{{'-stable' if jenkins_lts else ''}} binary/"
+- name: Install Jenkins depencies
+  ansible.builtin.package:
+    name: "{{jenkins_dependencies}}"
+- name: Install Jenkins
+  ansible.builtin.package:
+    name:
+      - jenkins
+- name: Add service override folder
+  ansible.builtin.file:
+    state: 'directory'
+    dest: '/etc/systemd/system/jenkins.service.d'
+    owner: 'root'
+    group: 'root'
+    mode: '0755'
+- name: Add service override
+  when: jenkins_systemd_service_override|default(false)
+  ansible.builtin.copy:
+    dest: '/etc/systemd/system/jenkins.service.d/override.conf'
+    content: "{{jenkins_systemd_service_override}}"
+    owner: 'root'
+    group: 'root'
+    mode: '0644'
+  notify:
+    - Systemd daemon-reload
+    - Request Jenkins restart
+- name: Jenkins service
+  ansible.builtin.service:
+    name: jenkins
+    enabled: true
+    state: started
+- name: Jenkins plugin
+  community.general.jenkins_plugin:
+    name: "{{item}}"
+    state: "{{item.state|default('present')}}"
+    url: "{{jenkins_url|default('http://localhost:8080')}}"
+    url_username: "{{jenkins_url_username}}"
+    url_password: "{{jenkins_url_password}}"
+  loop: "{{jenkins_plugins}}"
+  notify:
+    - Request Jenkins restart
+  tags:
+    - slow
index d773102ce8f1e9180ca063bfa220d7923d8edaf0..93569f8e57a5ed58b4f6710bbe39a8e57e4f3f11 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: Install virtualization packages
   apt:
 ---
 - 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
 - name: Run libvirtd
   systemd:
     name: libvirtd
index 3313f307b423fc728b705bf97a1f54c8c37a3d85..495a6f0999ae5d36675209e3ca0c6fe95a044a60 100644 (file)
@@ -7,6 +7,10 @@
   <vcpu placement='static'>{{ vm.vcpu }}</vcpu>
   <os>
     <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
   <vcpu placement='static'>{{ vm.vcpu }}</vcpu>
   <os>
     <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
+    {% if 'efi' in vm and vm.efi %}
+    <loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.fd</loader>
+    <nvram>/var/lib/libvirt/qemu/nvram/{% vm.name %}_VARS.fd</nvram>
+    {% endif %}
     <bootmenu enable='yes'/>
   </os>
   <features>
     <bootmenu enable='yes'/>
   </os>
   <features>
       <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
     </rng>
   </devices>
       <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
     </rng>
   </devices>
-</domain>
\ No newline at end of file
+</domain>
index d9882853a6b53cda335d4c7d2c07b2c0eec701ad..2dbd01dd4f3edb172dc176449bd64d0b8f79d8d5 100644 (file)
@@ -7,8 +7,10 @@ vm_defaults:
   net_bridge: 'br102'
   # Non-default keys
   # cdrom: /path/to/file.iso
   net_bridge: 'br102'
   # Non-default keys
   # cdrom: /path/to/file.iso
-  # uuid: xxxx-yyyy
+  # efi: true/false
   # name: xyz
   # name: xyz
+  # uuid: xxxx-yyyy
+
 isos:
   - url: https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso
     checksum: "sha256:45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2"
 isos:
   - url: https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso
     checksum: "sha256:45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2"
index e27bbc8a9468c2ad424f69742cba0823453594d5..4041de4c78b70209530f81fd2464afbbb6a53818 100644 (file)
@@ -7,7 +7,7 @@ lttng_modules_packages:
   - kernel-wedge
   - kmod
   - libelf-dev
   - kernel-wedge
   - kmod
   - libelf-dev
-  - liblz4-tool
+  - lz4
   - s3cmd
   - u-boot-tools
   - zstd
   - s3cmd
   - u-boot-tools
   - zstd
index b03ecdbdd68ecc06716e52a777285c0b8077277e..4e8423df0e30c7796f25c4163231086ed433ec93 100644 (file)
@@ -5,6 +5,7 @@ lttng_tools_packages:
   - libpopt-dev
   - libxml2-dev
   - shellcheck
   - libpopt-dev
   - libxml2-dev
   - shellcheck
+  - systemtap-sdt-dev
 
 lttng_tools_packages_no_recommends:
   - asciidoc
 
 lttng_tools_packages_no_recommends:
   - asciidoc
index 2f80ef9c9a95e4cd696919e183c834acce8579a2..85b79cc03da397f553f0a41d58e1dafc8bde2b60 100644 (file)
@@ -4,4 +4,5 @@ lttng_tools_packages:
   - bash-completion
   - libxml2-devel
   - popt-devel
   - bash-completion
   - libxml2-devel
   - popt-devel
+  - systemtap-sdt-devel
   - xmlto
   - xmlto
index b41902c51a97fcb3a37060b9df4a98ccff998bc3..41f7ad3a4950f60e3755b679aeb13e084b5d2ffa 100644 (file)
@@ -3,6 +3,7 @@ lttng_tools_packages:
   - bash-completion
   - libxml2-devel
   - popt-devel
   - bash-completion
   - libxml2-devel
   - popt-devel
+  - systemtap-sdt-devel
 
 lttng_tools_packages_no_recommends:
   - asciidoc
 
 lttng_tools_packages_no_recommends:
   - asciidoc
index dd0d18985fb6057565c012c32a7ae173cde7bbca..6625f9494effce3a2f9b88e91ed04a58a3e12f38 100644 (file)
@@ -1,3 +1,86 @@
 ---
 - name: Ensure lttng-ust build dependencies are installed.
   zypper: "name={{ lttng_ust_packages }} state=installed update_cache=yes"
 ---
 - name: Ensure lttng-ust build dependencies are installed.
   zypper: "name={{ lttng_ust_packages }} state=installed update_cache=yes"
+
+- name: Ensure log4j-1.2.jar exists
+  when: ansible_distribution_major_version == "12"
+  ansible.builtin.file:
+    state: link
+    src: '/usr/share/java/log4j-1.2.jar'
+    dest: '/usr/share/java/log4j.jar'
+
+# log4j2 is required for testing all the java agents, but is not available
+# on SLES12SP5 via packages.
+- name: Manually install log4j2
+  when: lttng_ust_manual_log4j2_installation|default(false)
+  block:
+    - name: Check if download required
+      ansible.builtin.command:
+        argv: ['test', '-L', '/usr/share/java/log4j-core.jar', '-a',
+        '-e', '/usr/share/java/log4j-core.jar', '-a',
+        '-L', '/usr/share/java/log4j-api.jar', '-a',
+        '-e', '/usr/share/java/log4j-api.jar', '-a',
+        '-f', "/usr/share/java/apache-log4j-{{lttng_ust_log4j2_version}}-bin/log4j-api-{{lttng_ust_log4j2_version}}.jar", '-a',
+        '-f', "/usr/share/java/apache-log4j-{{lttng_ust_log4j2_version}}-bin/log4j-core-{{lttng_ust_log4j2_version}}.jar"
+        ]
+      ignore_errors: true
+      register: log4j2_download_required
+    - when: "log4j2_download_required.rc != 0"
+      block:
+        - ansible.builtin.tempfile:
+            state: file
+          register: log4j2_asc_tempfile
+        - ansible.builtin.get_url:
+            url: "https://archive.apache.org/dist/logging/log4j/{{lttng_ust_log4j2_version}}/apache-log4j-{{lttng_ust_log4j2_version}}-bin.tar.gz.asc"
+            dest: "{{log4j2_asc_tempfile.path}}"
+            force: true
+        - ansible.builtin.tempfile:
+            state: file
+          register: log4j2_tempfile
+        - name: Download log4j2 binary release
+          ansible.builtin.get_url:
+            checksum: "sha256:https://archive.apache.org/dist/logging/log4j/{{lttng_ust_log4j2_version}}/apache-log4j-{{lttng_ust_log4j2_version}}-bin.tar.gz.sha256"
+            url: "https://archive.apache.org/dist/logging/log4j/{{lttng_ust_log4j2_version}}/apache-log4j-{{lttng_ust_log4j2_version}}-bin.tar.gz"
+            dest: "{{log4j2_tempfile.path}}"
+            force: true
+        - ansible.builtin.tempfile:
+            state: file
+          register: log4j2_keys_tempfile
+        - ansible.builtin.get_url:
+            url: "https://downloads.apache.org/logging/KEYS"
+            dest: "{{log4j2_keys_tempfile.path}}"
+            force: true
+        - name: Import Apache developer keys
+          ansible.builtin.command:
+            argv: ['gpg', '--import', "{{log4j2_keys_tempfile.path}}"]
+          # gpg returns non-zero exit codes if only some of the keys
+          # fail to import.
+          ignore_errors: true
+        - name: Verify PGP signature
+          ansible.builtin.command:
+            argv: ['gpg', '--verify', "{{log4j2_asc_tempfile.path}}", "{{log4j2_tempfile.path}}"]
+        - name: Unpack
+          ansible.builtin.unarchive:
+            remote_src: true
+            src: "{{log4j2_tempfile.path}}"
+            dest: "/usr/share/java"
+            include:
+              - "apache-log4j-{{lttng_ust_log4j2_version}}-bin/log4j-api-{{lttng_ust_log4j2_version}}.jar"
+              - "apache-log4j-{{lttng_ust_log4j2_version}}-bin/log4j-core-{{lttng_ust_log4j2_version}}.jar"
+        - name: Setup symlinks
+          ansible.builtin.file:
+            state: link
+            src: "/usr/share/java/apache-log4j-{{lttng_ust_log4j2_version}}-bin/log4j-{{item}}-{{lttng_ust_log4j2_version}}.jar"
+            dest: '/usr/share/java/log4j-{{item}}.jar'
+          with_items:
+            - api
+            - core
+          # block:
+          #   - ansible.builtin.file:
+          #       state: link
+          #       src: "/usr/share/java/log4j-api-{{lttng_ust_log4j2_version}}.jar"
+          #       dest: '/usr/share/java/log4j-api.jar'
+          #   - ansible.builtin.file:
+          #       state: link
+          #       src: "/usr/share/java/log4j-core-{{lttng_ust_log4j2_version}}.jar"
+          #       dest: '/usr/share/java/log4j-core.jar'
index 208884099c247448cb226eef706ab150d2ec4371..42c166cc687bd1f1d8582c01720ccec44d21b0be 100644 (file)
@@ -1,4 +1,7 @@
 ---
 ---
+lttng_ust_log4j2_version: "2.17.1"
+lttng_ust_manual_log4j2_installation: true
+
 lttng_ust_packages:
   - libnuma-devel
   - libuuid-devel
 lttng_ust_packages:
   - libnuma-devel
   - libuuid-devel
index 3ce91fe90e88bf7699ead96a19f9184624f52855..3aeac2f57e21703a46000eb43bbbc80a33e9cc65 100644 (file)
@@ -1,12 +1,16 @@
 ---
 lxd_container_defaults:
 ---
 lxd_container_defaults:
+  # The socket URL is different for Incus
+  url: "unix:/var/lib/incus/unix.socket"
   ephemeral: false
   profiles:
     - ci-node
   source:
     type: image
     mode: pull
   ephemeral: false
   profiles:
     - ci-node
   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
   wait_for_container: true
+
+lxd_core_pattern: '/tmp/core.%p'
index 1f68334ca761e0ecf0c94a3a7aff50b7b46bb599..2dfe552402a5e7d37abac78a60c7a3e001375ce3 100644 (file)
@@ -2,5 +2,5 @@
 - name: Merge defaults
   set_fact:
     lxd_container_config: "{{lxd_container_defaults|combine(object)}}"
 - 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}}"
   community.general.lxd_container: "{{lxd_container_config}}"
index c6a58b5e41902f447919f1bdec665d99ad835c73..0a3c58b0488aa7b266faa4d3b85723215b0cd2d7 100644 (file)
@@ -1,4 +1,24 @@
 ---
 ---
+
+# The core pattern is used by the CI containers
+- when: ansible_virtualization_role == "host" or (ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm")
+  block:
+    - name: 'Set core pattern for reboot'
+      ansible.builtin.copy:
+        dest: '/etc/sysctl.d/10-core_pattern.conf'
+        owner: 'root'
+        group: 'root'
+        mode: '0644'
+        content: "kernel.core_pattern /tmp/core.%p\n"
+    - name: 'Check current core pattern'
+      ansible.builtin.command:
+        argv: ['cat', '/proc/sys/kernel/core_pattern']
+      register: current_core_pattern
+    - name: 'Update current core pattern'
+      when: current_core_pattern.stdout|trim != "'{{lxd_core_pattern}}'"
+      ansible.builtin.command:
+        argv: ['sysctl', '-w', "kernel.core_pattern='{{lxd_core_pattern}}'"]
+
 - name: Install LXD
   ansible.builtin.apt:
     name: lxd
 - name: Install LXD
   ansible.builtin.apt:
     name: lxd
     - ansible.builtin.shell:
         cmd: 'lxd init --preseed=true < /etc/lxd/lxd_init.yml'
       when: lxd_init_template.changed
     - ansible.builtin.shell:
         cmd: 'lxd init --preseed=true < /etc/lxd/lxd_init.yml'
       when: lxd_init_template.changed
+- name: Check for images volume configuration
+  ansible.builtin.command:
+    argv: ['lxc', 'config', "--target={{lxd_cluster['server_name']|default(ansible_hostname)}}", 'get', 'storage.images_volume']
+  register: images_volume_conf
+- name: Configure images volume
+  when: images_volume_conf.stdout|trim != "default/storage-images"
+  block:
+    - name: Create volume
+      ansible.builtin.command:
+        argv: ['lxc', 'storage', 'volume', 'create', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'default', 'storage-images']
+    - ansible.builtin.command:
+        argv: ['lxc', 'config', 'set', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'storage.images_volume', 'default/storage-images']
+
+- name: Check for backups volume configuration
+  ansible.builtin.command:
+    argv: ['lxc', 'config', "--target={{lxd_cluster['server_name']|default(ansible_hostname)}}", 'get', 'storage.backups_volume']
+  register: backups_volume_conf
+- name: Configure backups volume
+  when: backups_volume_conf.stdout|trim != "default/storage-backups"
+  block:
+    - name: Create volume
+      ansible.builtin.command:
+        argv: ['lxc', 'storage', 'volume', 'create', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'default', 'storage-backups']
+    - ansible.builtin.command:
+        argv: ['lxc', 'config', 'set', '--target', "{{lxd_cluster['server_name']|default(ansible_hostname)}}", 'storage.backups_volume', 'default/storage-backups']
index cb810d84888c4ac316ab785a331b6f42e69681fe..81552ea81e15f8c22567c9b598f5c1562fe40d41 100644 (file)
@@ -1,4 +1,20 @@
 ---
 netplan_manage: false
 ---
 netplan_manage: false
+
+# 0 or more non default config files
+# E.g.
+# netplan_configs:
+#   - name: example
+#     # filename: example  # don't add '.yaml', defautls to name
+#     # state: present
+#     # dependencies: []  # list of packages to install to support this configuration
+#     content:
+#       network:
+#         version: 2
+#         ethernets:
+#           eth1:
+#             addresses:
+#               ...
+netplan_configs: []
 netplan_content: ''
 netplan_apply: true
 netplan_content: ''
 netplan_apply: true
diff --git a/automation/ansible/roles/netplan/handlers/main.yml b/automation/ansible/roles/netplan/handlers/main.yml
new file mode 100644 (file)
index 0000000..82755b7
--- /dev/null
@@ -0,0 +1,6 @@
+---
+
+- name: Apply netplan
+  when: netplan_apply
+  ansible.builtin.command:
+    argv: ['netplan', 'apply']
diff --git a/automation/ansible/roles/netplan/tasks/config.yml b/automation/ansible/roles/netplan/tasks/config.yml
new file mode 100644 (file)
index 0000000..8cb63e4
--- /dev/null
@@ -0,0 +1,22 @@
+---
+- when: item.dependencies|default([])
+  ansible.builtin.package:
+    name: "{{item.dependencies}}"
+    install_recommends: false
+
+- when: state == 'present'
+  ansible.builtin.template:
+    src: "netplan.yaml.j2"
+    dest: "{{filename}}"
+    mode: '0600'
+    owner: 'root'
+    group: 'root'
+  notify:
+    - 'Apply netplan'
+
+- when: state != 'present'
+  ansible.builtin.file:
+    path: "{{filename}}"
+    state: "{{state}}"
+  notify:
+    - 'Apply netplan'
index 2bef5d8e22faf06003cfaba9305d6b3f1eadfb71..43476d310da5d5bdf7d815211ae6f82f08061152 100644 (file)
@@ -5,13 +5,15 @@
       ansible.builtin.apt:
         name: netplan.io
     - name: Update netplan default.yaml
       ansible.builtin.apt:
         name: netplan.io
     - name: Update netplan default.yaml
+      when: netplan_content
       ansible.builtin.copy:
         content: "{{netplan_content}}"
         dest: /etc/netplan/default.yaml
         owner: root
         group: root
       ansible.builtin.copy:
         content: "{{netplan_content}}"
         dest: /etc/netplan/default.yaml
         owner: root
         group: root
-        mode: '0640'
-      register: netplan_default_yaml
+        mode: '0600'
+      notify:
+        - 'Apply netplan'
     - name: Disable ifupdown on Debian
       when: ansible_distribution == "Debian"
       block:
     - name: Disable ifupdown on Debian
       when: ansible_distribution == "Debian"
       block:
             name: systemd-networkd
             enabled: true
             state: started
             name: systemd-networkd
             enabled: true
             state: started
-    - name: Apply netplan
-      when: netplan_default_yaml.changed and netplan_apply
-      ansible.builtin.command:
-        argv: ['netplan', 'apply']
+    - name: Manage non-default netplan configurations
+      ansible.builtin.include_tasks:
+        file: config.yml
+      vars:
+        "filename": "/etc/netplan/{{item.filename|default(item.name)}}.yaml"
+        "netplan_content": "{{item.content}}"
+        "state": "{{item.state|default('present')}}"
+      loop: "{{netplan_configs}}"
diff --git a/automation/ansible/roles/netplan/templates/netplan.yaml.j2 b/automation/ansible/roles/netplan/templates/netplan.yaml.j2
new file mode 100644 (file)
index 0000000..73f71c5
--- /dev/null
@@ -0,0 +1 @@
+{{netplan_content | to_nice_yaml }}
index 0847a6c081fe580616570a370e557c294d98d998..2979582f5deabf3927ba651ed5619ad713893b2d 100644 (file)
@@ -1,12 +1,12 @@
 ---
 
 ---
 
-- name: Connect product using full version
+- name: "Connect product '{{product}}' using full version"
   ansible.builtin.command:
   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
   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:
   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}}"]
diff --git a/automation/ansible/scripts/manage_jenkins_node.py b/automation/ansible/scripts/manage_jenkins_node.py
new file mode 100755 (executable)
index 0000000..62a3313
--- /dev/null
@@ -0,0 +1,260 @@
+#!/usr/bin/python3
+
+import argparse
+import configparser
+import logging
+import pathlib
+import requests
+import re
+import sys
+import time
+import xml.etree.ElementTree
+
+import jenkins
+
+
+def get_hypervisor(server, nodes, args):
+    found = 0
+    for node in nodes:
+        raw_config = server.get_node_config(node["name"])
+        logging.debug("Node config\n---\n%s\n---\n", raw_config)
+        node_config = xml.etree.ElementTree.fromstring(raw_config)
+        hypervisor = node_config.find(".//hypervisorDescription")
+        if hypervisor is None:
+            logging.info("Node '%s' has no hypervisorDescription", node["name"])
+            continue
+        found += 1
+        print(hypervisor.text.split("-", maxsplit=1)[1].strip() or "")
+    if found == 0:
+        sys.exit(1)
+    elif found != len(nodes):
+        sys.exit(2)
+
+
+def toggle_nodes(server, nodes, args, want_offline=True):
+    changed = []
+    for node in nodes:
+        if node["offline"] != want_offline:
+            logging.info(
+                "%s is %s, toggling",
+                node["name"],
+                "offline" if node["offline"] else "online",
+            )
+            if not args.dry_run:
+                if want_offline:
+                    server.disable_node(node["name"], args.reason)
+                else:
+                    server.enable_node(node["name"])
+            changed.append(node)
+        else:
+            logging.debug(
+                "%s is %s, skipping",
+                node["name"],
+                "offline" if node["offline"] else "online",
+            )
+
+    if "wait" not in args:
+        return
+
+    if args.wait < 0:
+        return
+
+    force_abort = True if "force_abort" in args and args.force_abort else False
+    abort_wait = args.abort_after if "abort_after" in args else 0
+    waited = 0
+    while True:
+        if not changed:
+            break
+        if (waited % 5) < 0.5:
+            try:
+                running_jobs = server.get_running_builds()
+                running_job_nodes = [build["node"] for build in running_jobs]
+                node_status = {
+                    node["name"]: node["offline"] for node in server.get_nodes()
+                }
+                logging.debug("%d job(s) running", len(running_job_nodes))
+            except requests.exceptions.ConnectionError:
+                server = jenkins.Jenkins(
+                    args.url, username=args.user, password=args.password
+                )
+                continue
+            changed = [
+                node
+                for node in changed
+                if node["name"] in running_job_nodes
+                or not node_status.get(node["name"], False)
+            ]
+            if not changed:
+                break
+            else:
+                logging.info(
+                    "%d node(s) still online or running jobs, waiting...", len(changed)
+                )
+                for node in changed:
+                    logging.debug("\t%s", node["name"])
+            if force_abort and waited >= abort_wait:
+                print(abort_wait)
+                abort_on = [
+                    node["name"]
+                    for node in changed
+                    if node["name"] in running_job_nodes
+                ]
+                for job in running_jobs:
+                    if job["node"] in [node["name"] for node in changed]:
+                        logging.info(
+                            "Aborting %s #%d on %s",
+                            job["name"],
+                            job["number"],
+                            job["node"],
+                        )
+                        if not args.dry_run:
+                            server.stop_build(job["name"], job["number"])
+        time.sleep(0.5)
+        waited += 0.5
+        if args.wait != 0 and waited > args.wait:
+            break
+    return
+
+
+def get_argument_parser():
+    parser = argparse.ArgumentParser(
+        prog="update_ci_nodes.py", description="Run playbook against Jenkins nodes"
+    )
+    parser.add_argument(
+        "--dry-run",
+        action="store_true",
+        default=False,
+        help="Do not submit any changes",
+    )
+    parser.add_argument(
+        "-q",
+        "--quiet",
+        action="store_const",
+        dest="loglevel",
+        const=logging.ERROR,
+        default=logging.INFO,
+        help="Only output errors",
+    )
+    parser.add_argument(
+        "-v",
+        "--verbose",
+        action="store_const",
+        dest="loglevel",
+        const=logging.DEBUG,
+        help="Increase verbosity",
+    )
+    parser.add_argument(
+        "-u", "--url", default=None, help="Jenkins server URL including protocol"
+    )
+    parser.add_argument("--user", default=None, help="Jenkins username")
+    parser.add_argument("--password", default=None, help="Jenkins password")
+    parser.add_argument(
+        "--include-builtin",
+        default=False,
+        action="store_true",
+        help="Allow operations to be done on the built-in node",
+    )
+    parser.add_argument(
+        "-f",
+        "--config-file",
+        default="~/.config/jenkins_jobs/jenkins_jobs.ini",
+        type=pathlib.Path,
+        help="An INI config file as used by jenkins_jobs",
+    )
+    subparsers = parser.add_subparsers(help="sub-command help")
+
+    enable_parser = subparsers.add_parser("enable", help="Enable a Jenkins node")
+    enable_parser.set_defaults(
+        callback=lambda server, nodes, args: toggle_nodes(
+            server, nodes, args, want_offline=False
+        )
+    )
+    enable_parser.add_argument(
+        "node", default="", help="A python regex to filter nodes by", nargs="?"
+    )
+
+    disable_parser = subparsers.add_parser("disable", help="Disable a Jenkins node")
+    disable_parser.set_defaults(
+        callback=lambda server, nodes, args: toggle_nodes(
+            server, nodes, args, want_offline=True
+        )
+    )
+    disable_parser.add_argument(
+        "-w",
+        "--wait",
+        default=0,
+        type=int,
+        help="The number of minutes to wait until the node(s) are offline. 0 waits forever, and anything less than zero doesn't wait",
+    )
+    disable_parser.add_argument(
+        "-r", "--reason", help="The offline reason", default="No reason given"
+    )
+    disable_parser.add_argument(
+        "--force-abort",
+        default=False,
+        action="store_true",
+        help="Abort any running jobs on nodes that should be offlined",
+    )
+    disable_parser.add_argument(
+        "--abort-after",
+        default=0,
+        type=int,
+        help="Force the job abort after N seconds have passed. For values larger than 0, the --wait argument should also be set",
+    )
+    disable_parser.add_argument(
+        "node", default="", help="A python regex to filter nodes by", nargs="?"
+    )
+
+    getcloud_parser = subparsers.add_parser(
+        "get_hypervisor", help="Get the libvirt cloud of a node"
+    )
+    getcloud_parser.set_defaults(callback=get_hypervisor)
+    getcloud_parser.add_argument(
+        "node", default="", help="A python regex to filter nodes by", nargs="?"
+    )
+
+    return parser
+
+
+if __name__ == "__main__":
+    parser = get_argument_parser()
+    args = parser.parse_args()
+    logging.basicConfig(
+        level=args.loglevel, format="[%(asctime)s] - %(levelname)s - %(message)s"
+    )
+    if "callback" not in args or not args.callback:
+        log.error("Valid command required")
+        parser.print_help()
+        sys.exit(1)
+
+    if args.config_file is not None:
+        config = configparser.ConfigParser()
+        config.read(args.config_file.expanduser().absolute())
+        if "jenkins" not in config.sections():
+            logging.error(
+                "[jenkins] section not found in config file '%s", args.config_file
+            )
+            sys.exit(1)
+        if args.url is None:
+            args.url = config.get("jenkins", "url")
+        if args.user is None:
+            args.user = config["jenkins"]["user"]
+        if args.password is None:
+            args.password = config["jenkins"]["password"]
+
+    assert args.user is not None
+    assert args.url is not None
+    assert args.password is not None
+    server = jenkins.Jenkins(args.url, username=args.user, password=args.password)
+    nodes = server.get_nodes()
+    logging.debug("%d node(s) before filtering", len(nodes))
+    if not args.include_builtin:
+        logging.debug("Filtering out Built-In Node")
+        nodes = [n for n in nodes if n["name"] != "Built-In Node"]
+
+    if "node" in args and args.node:
+        pattern = re.compile(args.node)
+        nodes = [node for node in nodes if pattern.match(node["name"])]
+        logging.debug("%d node(s) after filtering with `%s`", len(nodes), pattern)
+
+    args.callback(server, nodes, args)
index c17c693c7310b40f3b93b18f48bd8d1536f2ac67..1eb92d5fade78e1ccb94f1934dfc9b08f660d00e 100755 (executable)
@@ -9,41 +9,32 @@ import dns.message
 import dns.query
 import dns.resolver
 
 import dns.query
 import dns.resolver
 
+
 def get_argument_parser():
     parser = argparse.ArgumentParser(
 def get_argument_parser():
     parser = argparse.ArgumentParser(
-        prog='update_dns_entry.py',
-        description='Generate fixed-address DHCP configuration based for hosts based on DNS entries'
-    )
-    parser.add_argument(
-        '-s', '--server', default=None, required=True,
-        help='Server for DNS updates'
-    )
-    parser.add_argument(
-        '-u', '--user', default=None,
-        help='The user to use with samba-tool'
-    )
-    parser.add_argument(
-        '-z', '--zone', required=True,
-        help='The zone in which to update the entry'
+        prog="update_dns_entry.py",
+        description="Generate fixed-address DHCP configuration based for hosts based on DNS entries",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-n', '--name', required=True,
-        help='DNS entry name'
+        "-s", "--server", default=None, required=True, help="Server for DNS updates"
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-v', '--value', required=True,
-        help='DNS entry value'
+        "-u", "--user", default=None, help="The user to use with samba-tool"
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-t', '--type', default='A',
-        help='Entry type'
+        "-z", "--zone", required=True, help="The zone in which to update the entry"
     )
     )
+    parser.add_argument("-n", "--name", required=True, help="DNS entry name")
+    parser.add_argument("-v", "--value", required=True, help="DNS entry value")
+    parser.add_argument("-t", "--type", default="A", help="Entry type")
     return parser
 
 
     return parser
 
 
-def update_dns_entry(server, zone, name, entry_type, value, user=None, with_reverse = True):
+def update_dns_entry(
+    server, zone, name, entry_type, value, user=None, with_reverse=True
+):
     if entry_type == "A":
     if entry_type == "A":
-        assert(ipaddress.ip_address(value))
+        assert ipaddress.ip_address(value)
     try:
         server_ip = str(ipaddress.ip_address(server))
     except ValueError:
     try:
         server_ip = str(ipaddress.ip_address(server))
     except ValueError:
@@ -51,44 +42,66 @@ def update_dns_entry(server, zone, name, entry_type, value, user=None, with_reve
 
     commands = []
     # Verify existing entry
 
     commands = []
     # Verify existing entry
-    query = dns.message.make_query('.'.join([name, zone]), entry_type)
-    record = dns.query.udp(query, server_ip);
+    query = dns.message.make_query(".".join([name, zone]), entry_type)
+    record = dns.query.udp(query, server_ip)
     if len(record.answer) == 0:
         # Create
     if len(record.answer) == 0:
         # Create
-        argv = ['samba-tool', 'dns', 'add', server, zone, name, entry_type, value]
+        argv = ["samba-tool", "dns", "add", server, zone, name, entry_type, value]
         if user is not None:
         if user is not None:
-            argv += ['-U', user]
+            argv += ["-U", user]
         commands.append(argv)
     else:
         commands.append(argv)
     else:
-        assert(len(record.answer) == 1)
+        assert len(record.answer) == 1
         # Check validity
         existing = (record.answer)[0][0].to_text()
         if existing != value:
             # Update
         # Check validity
         existing = (record.answer)[0][0].to_text()
         if existing != value:
             # Update
-            argv = ['samba-tool', 'dns', 'update', server, zone, name, entry_type, existing, value]
+            argv = [
+                "samba-tool",
+                "dns",
+                "update",
+                server,
+                zone,
+                name,
+                entry_type,
+                existing,
+                value,
+            ]
             if user is not None:
             if user is not None:
-                argv += ['-U', user]
+                argv += ["-U", user]
             commands.append(argv)
 
     # Check reverse
             commands.append(argv)
 
     # Check reverse
-    if with_reverse and entry_type == 'A':
-        rname, rzone = ipaddress.ip_address(value).reverse_pointer.split('.', 1)
-        rvalue = '.'.join([name, zone]) + '.'
-        rtype = 'PTR'
-        query = dns.message.make_query(ipaddress.ip_address(value).reverse_pointer, rtype)
+    if with_reverse and entry_type == "A":
+        rname, rzone = ipaddress.ip_address(value).reverse_pointer.split(".", 1)
+        rvalue = ".".join([name, zone]) + "."
+        rtype = "PTR"
+        query = dns.message.make_query(
+            ipaddress.ip_address(value).reverse_pointer, rtype
+        )
         record = dns.query.udp(query, server_ip)
         if len(record.answer) == 0:
         record = dns.query.udp(query, server_ip)
         if len(record.answer) == 0:
-            argv = ['samba-tool', 'dns', 'add', server, rzone, rname, rtype, rvalue]
+            argv = ["samba-tool", "dns", "add", server, rzone, rname, rtype, rvalue]
             if user is not None:
             if user is not None:
-                argv += ['-U', user]
+                argv += ["-U", user]
             commands.append(argv)
         else:
             commands.append(argv)
         else:
-            assert(len(record.answer) == 1)
+            assert len(record.answer) == 1
             existing = (record.answer)[0][0].to_text()
             if existing != value:
             existing = (record.answer)[0][0].to_text()
             if existing != value:
-                argv = ['samba-tool', 'dns', 'update', server, rzone, rname, rtype, existing, rvalue]
+                argv = [
+                    "samba-tool",
+                    "dns",
+                    "update",
+                    server,
+                    rzone,
+                    rname,
+                    rtype,
+                    existing,
+                    rvalue,
+                ]
                 if user is not None:
                 if user is not None:
-                    argv += ['-U', user]
+                    argv += ["-U", user]
                 commands.append(argv)
 
     # Run commands
                 commands.append(argv)
 
     # Run commands
@@ -96,7 +109,9 @@ def update_dns_entry(server, zone, name, entry_type, value, user=None, with_reve
         subprocess.run(command, check=True)
 
 
         subprocess.run(command, check=True)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     parser = get_argument_parser()
     args = parser.parse_args()
     parser = get_argument_parser()
     args = parser.parse_args()
-    update_dns_entry(args.server, args.zone, args.name, args.type, args.value, user=args.user)
+    update_dns_entry(
+        args.server, args.zone, args.name, args.type, args.value, user=args.user
+    )
index 02df70ed51ca44907928a2a27dd2150dfecf4e56..63c2d1718eed43890ab5284510a6d8c975aec476 100755 (executable)
@@ -8,64 +8,77 @@ import xml.etree.ElementTree
 
 import jenkins
 
 
 import jenkins
 
+
 def get_argument_parser():
     parser = argparse.ArgumentParser(
 def get_argument_parser():
     parser = argparse.ArgumentParser(
-        prog='update_jenkins_node.py',
-        description='Create, update, or delete Jenkins nodes'
-    )
-    parser.add_argument(
-        '-u', '--url', default=None,
-        help='Jenkins server URL including protocol'
-    )
-    parser.add_argument(
-        '--user', default=None,
-        help='Jenkins username'
+        prog="update_jenkins_node.py",
+        description="Create, update, or delete Jenkins nodes",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '--password', default=None,
-        help='Jenkins password'
+        "-u", "--url", default=None, help="Jenkins server URL including protocol"
     )
     )
+    parser.add_argument("--user", default=None, help="Jenkins username")
+    parser.add_argument("--password", default=None, help="Jenkins password")
     parser.add_argument(
     parser.add_argument(
-        '-n', '--node', default=None, required=True,
-        help='The name of the node to manage in Jenkins'
+        "-n",
+        "--node",
+        default=None,
+        required=True,
+        help="The name of the node to manage in Jenkins",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-c', '--node-config', default=[], action='append',
-        help='An equals-separated set path=value[=attrib]. When attrib is not set, text is assumed'
+        "-c",
+        "--node-config",
+        default=[],
+        action="append",
+        help="An equals-separated set path=value[=attrib]. When attrib is not set, text is assumed",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-f', '--config-file', default=None, type=argparse.FileType('r'),
-        help='An INI config file as used by jenkins_jobs'
+        "-f",
+        "--config-file",
+        default=None,
+        type=argparse.FileType("r"),
+        help="An INI config file as used by jenkins_jobs",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-s', '--state', default='online',
-        choices=['online', 'offline', 'absent'],
-        help='The state of the Jenkins node'
+        "-s",
+        "--state",
+        default="online",
+        choices=["online", "offline", "absent"],
+        help="The state of the Jenkins node",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-m', '--message', default='',
-        help='A message to set for the offline reason of a node'
+        "-m",
+        "--message",
+        default="",
+        help="A message to set for the offline reason of a node",
     )
     parser.add_argument(
     )
     parser.add_argument(
-        '-j', '--json', default='',
-        help='Additional config in a json dictionary which will be appended after -c items',
+        "-j",
+        "--json",
+        default="",
+        help="Additional config in a json dictionary which will be appended after -c items",
     )
     return parser
 
 
     )
     return parser
 
 
-def manage_node(url, user, password, node, state, offline_message='', config={}):
+def manage_node(url, user, password, node, state, offline_message="", config={}):
     server = jenkins.Jenkins(url, username=user, password=password)
     exists = server.node_exists(node)
     node_info = {}
     changed = False
     server = jenkins.Jenkins(url, username=user, password=password)
     exists = server.node_exists(node)
     node_info = {}
     changed = False
-    if exists and state == 'absent':
+    if exists and state == "absent":
         server.delete_node(node)
         changed = True
         server.delete_node(node)
         changed = True
-    if not exists and state != 'absent':
-        server.create_node(node, numExecutors=1, remoteFS='/home/jenkins',
-                           launcher=jenkins.LAUNCHER_SSH)
+    if not exists and state != "absent":
+        server.create_node(
+            node,
+            numExecutors=1,
+            remoteFS="/home/jenkins",
+            launcher=jenkins.LAUNCHER_SSH,
+        )
         changed = True
         changed = True
-    if state != 'absent':
+    if state != "absent":
         # Check configuration
         updated = False
         node_config = xml.etree.ElementTree.fromstring(server.get_node_config(node))
         # Check configuration
         updated = False
         node_config = xml.etree.ElementTree.fromstring(server.get_node_config(node))
@@ -74,8 +87,8 @@ def manage_node(url, user, password, node, state, offline_message='', config={})
             new_element = None
             current_key = key
             while element is None:
             new_element = None
             current_key = key
             while element is None:
-                head = key.rsplit('/', 1)[0] if '/' in current_key else None
-                tail = key.rsplit('/', 1)[1] if '/' in current_key else current_key
+                head = key.rsplit("/", 1)[0] if "/" in current_key else None
+                tail = key.rsplit("/", 1)[1] if "/" in current_key else current_key
                 e = xml.etree.ElementTree.Element(tail)
                 if new_element is not None:
                     e.append(new_element)
                 e = xml.etree.ElementTree.Element(tail)
                 if new_element is not None:
                     e.append(new_element)
@@ -93,69 +106,72 @@ def manage_node(url, user, password, node, state, offline_message='', config={})
                         current_key = head
                         continue
 
                         current_key = head
                         continue
 
-            if value['attrib'] is None:
-                if element.text != value['value']:
+            if value["attrib"] is None:
+                if element.text != value["value"]:
                     updated = True
                     updated = True
-                    element.text = value['value']
+                    element.text = value["value"]
             else:
                 try:
             else:
                 try:
-                    if element.attrib[value['attrib']] != value['value']:
+                    if element.attrib[value["attrib"]] != value["value"]:
                         updated = True
                         updated = True
-                        element.attrib[value['attrib']] = value['value']
+                        element.attrib[value["attrib"]] = value["value"]
                 except KeyError:
                 except KeyError:
-                    element.attrib[value['attrib']] = value['value']
+                    element.attrib[value["attrib"]] = value["value"]
                     updated = True
         if updated:
             xml_string = xml.etree.ElementTree.tostring(
                     updated = True
         if updated:
             xml_string = xml.etree.ElementTree.tostring(
-                node_config,
-                xml_declaration=True,
-                encoding='unicode'
+                node_config, xml_declaration=True, encoding="unicode"
             )
             server.reconfig_node(node, xml_string)
             changed = True
         # Online/offline
         node_info = server.get_node_info(node)
             )
             server.reconfig_node(node, xml_string)
             changed = True
         # Online/offline
         node_info = server.get_node_info(node)
-        if node_info['offline'] and state == 'online':
+        if node_info["offline"] and state == "online":
             server.enable_node(node)
             changed = True
             server.enable_node(node)
             changed = True
-        if not node_info['offline'] and state == 'offline':
+        if not node_info["offline"] and state == "offline":
             server.disable_node(node, offline_message)
             changed = True
     return changed
 
 
             server.disable_node(node, offline_message)
             changed = True
     return changed
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     parser = get_argument_parser()
     args = parser.parse_args()
     if args.config_file is not None:
         config = configparser.ConfigParser()
         config.read_file(args.config_file)
     parser = get_argument_parser()
     args = parser.parse_args()
     if args.config_file is not None:
         config = configparser.ConfigParser()
         config.read_file(args.config_file)
-        if 'jenkins' not in config.sections():
+        if "jenkins" not in config.sections():
             print("[jenkins] section not found")
             sys.exit(1)
         if args.url is None:
             print("[jenkins] section not found")
             sys.exit(1)
         if args.url is None:
-            args.url = config.get('jenkins', 'url')
+            args.url = config.get("jenkins", "url")
         if args.user is None:
         if args.user is None:
-            args.user = config['jenkins']['user']
+            args.user = config["jenkins"]["user"]
         if args.password is None:
         if args.password is None:
-            args.password = config['jenkins']['password']
-    assert(args.user is not None)
-    assert(args.url is not None)
-    assert(args.password is not None)
+            args.password = config["jenkins"]["password"]
+    assert args.user is not None
+    assert args.url is not None
+    assert args.password is not None
     node_config = {}
     for entry in args.node_config:
     node_config = {}
     for entry in args.node_config:
-        key, value = entry.split('=', 1)
+        key, value = entry.split("=", 1)
         node_config[key] = {
         node_config[key] = {
-            'attrib': value.split('=', 1)[1] if '=' in value else None,
-            'value': value.split('=', 1)[0] if '=' in value else value,
+            "attrib": value.split("=", 1)[1] if "=" in value else None,
+            "value": value.split("=", 1)[0] if "=" in value else value,
         }
     if args.json:
         for key, value in json.loads(args.json).items():
             node_config[key] = {
         }
     if args.json:
         for key, value in json.loads(args.json).items():
             node_config[key] = {
-                'attrib': value.split('=', 1)[1] if '=' in value else None,
-                'value': value.split('=', 1)[0] if '=' in value else value,
+                "attrib": value.split("=", 1)[1] if "=" in value else None,
+                "value": value.split("=", 1)[0] if "=" in value else value,
             }
     manage_node(
             }
     manage_node(
-        args.url, args.user, args.password, args.node, args.state,
-        args.message, node_config
+        args.url,
+        args.user,
+        args.password,
+        args.node,
+        args.state,
+        args.message,
+        node_config,
     )
     )
index 0647675555310879df82dc846b0fd4658b499092..729af6bf92fce304900fa88591ec27c8d17efc7f 100644 (file)
   roles:
     - common
     - gitmirror
   roles:
     - common
     - gitmirror
+- hosts: jenkins
+  roles:
+    - common
+    - jenkins
 - hosts: ci_node:developer
   roles:
     - common
 - hosts: ci_node:developer
   roles:
     - common
index 0b5f27a798f04e61ad5c54944de90e0b43e419a2..d6fee3816770420b5308f407a07938b5a32053bd 100644 (file)
@@ -82,78 +82,162 @@ libvirt_host: ci-host-amd64-1b.internal.efficios.com
 # @note: `meta.address` doesn't set any additional information for libvirt VMs.
 #
 containers:
 # @note: `meta.address` doesn't set any additional information for libvirt VMs.
 #
 containers:
+  # ci-host-arm64-1a
   - meta:
   - meta:
-      address: 172.18.18.1
+      address: 172.18.16.87
     lxd:
     lxd:
-      name: git-mirror02
-      target: ci-host-amd64-1c
-      config:
-        # Using a privileged container here means we can avoid doing
-        # uid/gid mapping and reduce the work done during file IO
-        security.privileged: 'true'
-      devices:
-        git-mirror:
-          path: /storage/git-mirror
-          # This was created manually:
-          #   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
+      name: ci-node-deb12-arm64-1a-01
+      target: ci-host-arm64-1a
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/arm64
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-arm64 deb12'
       mode: EXCLUSIVE
   - meta:
       mode: EXCLUSIVE
   - meta:
-      address: 172.18.16.2
+      address: 172.18.16.88
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-02
+      name: ci-node-deb12-armhf-1a-01
+      target: ci-host-arm64-1a
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/armhf
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-armhf deb12'
       mode: EXCLUSIVE
       mode: EXCLUSIVE
+  # ci-host-arm64-1b
   - meta:
   - meta:
-      address: 172.18.16.3
+      address: 172.18.16.89
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-03
+      name: ci-node-deb12-arm64-1b-01
+      target: ci-host-arm64-1b
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/arm64
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-arm64 deb12'
       mode: EXCLUSIVE
   - meta:
       mode: EXCLUSIVE
   - meta:
-      address: 172.18.16.4
+      address: 172.18.16.90
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-04
+      name: ci-node-deb12-armhf-1b-01
+      target: ci-host-arm64-1b
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/armhf
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-armhf deb12'
       mode: EXCLUSIVE
       mode: EXCLUSIVE
+  # ci-host-arm64-2a
   - meta:
   - meta:
-      address: 172.18.16.5
+      address: 172.18.16.100
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-05
+      name: ci-node-deb12-arm64-2a-01
+      target: ci-host-arm64-2a
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/arm64
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-arm64 deb12'
       mode: EXCLUSIVE
   - meta:
       mode: EXCLUSIVE
   - meta:
-      address: 172.18.16.6
+      address: 172.18.16.101
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-06
+      name: ci-node-deb12-armhf-2a-01
+      target: ci-host-arm64-2a
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/armhf
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-armhf deb12'
       mode: EXCLUSIVE
       mode: EXCLUSIVE
+  # ci-host-arm64-2b
   - meta:
   - meta:
-      address: 172.18.16.7
+      address: 172.18.16.102
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-07
+      name: ci-node-deb12-arm64-2b-01
+      target: ci-host-arm64-2b
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/arm64
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-arm64 deb12'
       mode: EXCLUSIVE
   - meta:
       mode: EXCLUSIVE
   - meta:
-      address: 172.18.16.8
+      address: 172.18.16.103
     lxd:
     lxd:
-      name: ci-node-deb12-amd64-08
+      name: ci-node-deb12-armhf-2b-01
+      target: ci-host-arm64-2b
+      profiles:
+        - ci-node
+        - ci-node-arm
+      source:
+        type: image
+        server: https://images.linuxcontainers.org
+        protocol: simplestreams
+        mode: pull
+        alias: debian/bookworm/cloud/armhf
     jenkins:
     jenkins:
-      label: 'deb12-amd64 deb12'
+      label: 'deb12-armhf deb12'
       mode: EXCLUSIVE
       mode: EXCLUSIVE
+  - meta:
+      address: 172.18.18.1
+    lxd:
+      name: git-mirror02
+      target: ci-host-amd64-1c
+      config:
+        # Using a privileged container here means we can avoid doing
+        # uid/gid mapping and reduce the work done during file IO
+        security.privileged: 'true'
+      devices:
+        git-mirror:
+          path: /storage/git-mirror
+          # This was created manually:
+          #   zfs create -o mountpoint=/storage/git-mirror tank/lxd/custom/git-mirror
+          source: /storage/git-mirror
+          type: disk
   - meta:
       address: 172.18.16.9
     lxd:
   - meta:
       address: 172.18.16.9
     lxd:
@@ -785,6 +869,102 @@ containers:
     jenkins:
       label: 'deb12-i386 deb12'
       mode: EXCLUSIVE
     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'
+      efi: true
+  - 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'
+      efi: true
+  - 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'
+      efi: true
   # "Root " nodes in libvirt, since Jenkins can use the "libvirt agents" plugin
   # to revert to a specific snapshot before running a job
   #
   # "Root " nodes in libvirt, since Jenkins can use the "libvirt agents" plugin
   # to revert to a specific snapshot before running a job
   #
@@ -1126,3 +1306,28 @@ containers:
       disk: '/var/lib/libvirt/images/lava-node-amd64-05.qcow'
       disk_capacity: '10G'
       host: 'ci-host-amd64-2d.internal.efficios.com'
       disk: '/var/lib/libvirt/images/lava-node-amd64-05.qcow'
       disk_capacity: '10G'
       host: 'ci-host-amd64-2d.internal.efficios.com'
+  - jenkins:
+      name: "ci-rootnode-deb12-arm64-1a-01"
+      label: 'deb12 deb12-arm64-rootnode arm64-rootnode'
+      mode: EXCLUSIVE
+      config:
+        remoteFS: '/root'
+        launcher/hypervisorDescription: 'QEMU+ssh - ci-host-arm64-1a.internal.efficios.com'
+        launcher/virtualMachineName: 'ci-rootnode-deb12-arm64-1a-01'
+        launcher/delegate: 'hudson.plugins.sshslaves.SSHLauncher=class'
+        launcher/delegate/port: '22'
+        launcher/delegate/host: 'ci-rootnode-deb12-arm64-1a-01.internal.efficios.com'
+        launcher/delegate/credentialsId: 'bb5a81cf-346b-43fc-8586-3dc5e43801be'
+        ./hypervisorDescription: 'QEMU+ssh - ci-host-arm64-1a.internal.efficios.com'
+        ./virtualMachineName: 'ci-rootnode-deb12-arm64-1a-01'
+        snapshotName: ''
+        beforeJobSnapshotName: 'base-configuration'
+        startupWaitingPeriodSeconds: '20'
+        launcher/waitTimeMs: '20000'
+        shutdownMethod: 'destroy'
+    vm:
+      name: 'ci-rootnode-deb12-arm64-1a-01'
+      disk: '/var/lib/libvirt/images/ci-rootnode-deb12-arm64-1a-01.qcow'
+      host: 'ci-host-arm64-1a.internal.efficios.com'
+    meta:
+      address: 172.18.17.15
index e2806277c20828691fba1232295d52192f231e9d..802330ebe243851bbcbf46109daf474ead30515f 100644 (file)
@@ -34,6 +34,7 @@
             - origin/{version}
           basedir: src/babeltrace
           skip-tag: true
             - origin/{version}
           basedir: src/babeltrace
           skip-tag: true
+          git-tool: '{git_tool}'
 
     triggers:
       - pollscm:
 
     triggers:
       - pollscm:
             - '$GERRIT_REFSPEC'
           basedir: src/babeltrace
           skip-tag: true
             - '$GERRIT_REFSPEC'
           basedir: src/babeltrace
           skip-tag: true
+          git-tool: '{git_tool}'
 
     triggers:
       - gerrit: &babeltrace_trigger_gerrit_defaults
 
     triggers:
       - gerrit: &babeltrace_trigger_gerrit_defaults
 
     publishers:
       - archive:
 
     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
 
           allow-empty: false
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
 
     publishers:
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
       - archive:
     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
           allow-empty: false
       - ircbot: *babeltrace_publisher_ircbot_defaults
       - email-ext: *babeltrace_publisher_email-ext_defaults
     job_prefix: ''
     github_user: efficios
     github_name: babeltrace
     job_prefix: ''
     github_user: efficios
     github_name: babeltrace
+    git_tool: Default
     email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
     version:
       - stable-2.0
     email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
     version:
       - stable-2.0
           touchstone: '(build == "std") && (conf == "std")'
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: portbuild
           touchstone: '(build == "std") && (conf == "std")'
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, prod]
           filter: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, prod]
           filter: ''
           touchstone: ''
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: elbuild
           touchstone: ''
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: elbuild
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, prod]
           filter: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, prod]
           filter: ''
           confs: !!python/tuple [std, prod]
           filter: ''
           touchstone: ''
           confs: !!python/tuple [std, prod]
           filter: ''
           touchstone: ''
+          git_tool: jgit
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: freebsdbuild
           platforms: !!python/tuple [freebsd-amd64]
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: freebsdbuild
           platforms: !!python/tuple [freebsd-amd64]
           platforms: !!python/tuple [deb12-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static, prod]
           platforms: !!python/tuple [deb12-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static, prod]
-          ccs: !!python/tuple [clang-13, clang-14, clang-15]
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
           filter: ''
           touchstone: ''
       - 'babeltrace_{version}_release':
           filter: ''
           touchstone: ''
       - 'babeltrace_{version}_release':
     job_prefix: ''
     github_user: efficios
     github_name: babeltrace
     job_prefix: ''
     github_user: efficios
     github_name: babeltrace
+    git_tool: Default
     version:
       - stable-2.0
     version:
       - stable-2.0
-      - ctf2
       - master
     jobs:
     ## Master ##
       - master
     jobs:
     ## Master ##
           filter: ''
           touchstone: ''
           warnings_status: FAILED
           filter: ''
           touchstone: ''
           warnings_status: FAILED
+          git_tool: jgit
       - 'dev_review_babeltrace_{version}_{buildtype}':
       - 'dev_review_babeltrace_{version}_{buildtype}':
-          version: master
-          buildtype: winbuild
-          platforms: !!python/tuple [cygwin64, msys2-ucrt64]
-          builds: !!python/tuple [std]
-          confs: !!python/tuple [std]
-          filter: ''
-          touchstone: ''
-          warnings_status: FAILED
-
-      ## ctf2 temp branch ##
-      - 'dev_review_babeltrace_{version}_{buildtype}':
-          version: ctf2
-          buildtype: linuxbuild
-          platforms: !!python/tuple [deb12-amd64]
-          builds: !!python/tuple [std, oot, dist, oot-dist]
-          confs: !!python/tuple [std, static, prod, min]
-          filter: ''
-          touchstone: ''
-          warnings_status: FAILED
-      - 'dev_review_babeltrace_{version}_{buildtype}':
-          version: ctf2
-          buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          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}':
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           filter: ''
           touchstone: ''
           warnings_status: FAILED
       - 'dev_review_babeltrace_{version}_{buildtype}':
-          version: ctf2
-          buildtype: macosbuild
-          platforms: !!python/tuple [macos-arm64]
-          builds: !!python/tuple [std]
-          confs: !!python/tuple [std, prod]
-          filter: ''
-          touchstone: ''
-          warnings_status: FAILED
-      - 'dev_review_babeltrace_{version}_{buildtype}':
-          version: ctf2
+          version: master
           buildtype: winbuild
           platforms: !!python/tuple [cygwin64, msys2-ucrt64]
           builds: !!python/tuple [std]
           buildtype: winbuild
           platforms: !!python/tuple [cygwin64, msys2-ucrt64]
           builds: !!python/tuple [std]
       - 'dev_review_babeltrace_{version}_{buildtype}':
           version: stable-2.0
           buildtype: portbuild
       - 'dev_review_babeltrace_{version}_{buildtype}':
           version: stable-2.0
           buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           filter: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           filter: ''
           filter: ''
           touchstone: ''
           warnings_status: WARNING
           filter: ''
           touchstone: ''
           warnings_status: WARNING
+          git_tool: jgit
       - 'dev_review_babeltrace_{version}_{buildtype}':
           version: stable-2.0
           buildtype: winbuild
       - 'dev_review_babeltrace_{version}_{buildtype}':
           version: stable-2.0
           buildtype: winbuild
     job_prefix: dev_upstream_
     github_user: efficios
     github_name: babeltrace
     job_prefix: dev_upstream_
     github_user: efficios
     github_name: babeltrace
+    git_tool: Default
     email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
     version:
       - stable-1.5
     email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
     version:
       - stable-1.5
           touchstone: ''
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: elbuild
           touchstone: ''
       - '{job_prefix}babeltrace_{version}_{buildtype}':
           buildtype: elbuild
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           filter: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           filter: ''
     job_prefix: 'dev_jgalar_'
     github_user: jgalar
     github_name: babeltrace
     job_prefix: 'dev_jgalar_'
     github_user: jgalar
     github_name: babeltrace
+    git_tool: Default
     email_to: "jgalar@efficios.com"
     version:
       - stable-1.5-staging
     email_to: "jgalar@efficios.com"
     version:
       - stable-1.5-staging
           confs: !!python/tuple [std]
           filter: ''
           touchstone: ''
           confs: !!python/tuple [std]
           filter: ''
           touchstone: ''
+          git_tool: jgit
 
 
 - project:
 
 
 - project:
     job_prefix: 'dev_jgalar_'
     github_user: jgalar
     github_name: babeltrace
     job_prefix: 'dev_jgalar_'
     github_user: jgalar
     github_name: babeltrace
+    git_tool: Default
     email_to: "jgalar@efficios.com"
     version:
       - stable-2.0-staging
     email_to: "jgalar@efficios.com"
     version:
       - stable-2.0-staging
           confs: !!python/tuple [std, prod]
           filter: ''
           touchstone: ''
           confs: !!python/tuple [std, prod]
           filter: ''
           touchstone: ''
+          git_tool: jgit
 
 
 - project:
 
 
 - project:
index 9d2f4b0cff7320d9ae3eb4b280e085d80f610ef3..cdfcd355e6d6f829673075169517963f7bb84def 100644 (file)
@@ -32,7 +32,7 @@
       - choice: &images_parameters_IMAGE_TYPE
           name: 'IMAGE_TYPE'
           choices:
       - choice: &images_parameters_IMAGE_TYPE
           name: 'IMAGE_TYPE'
           choices:
-            - 'lxd'
+            - 'incus'
             - 'vm'
           description: 'The type of image to create'
       - choice:
             - 'vm'
           description: 'The type of image to create'
       - choice:
             - 'developer'
           description: 'The ansible group to apply to the image'
           required: true
             - 'developer'
           description: 'The ansible group to apply to the image'
           required: true
-      - string: &images_parameters_LXD_HOST
-          name: 'LXD_HOST'
+      - string: &images_parameters_INCUS_HOST
+          name: 'INCUS_HOST'
           default: 'ci-host-amd64-1a.internal.efficios.com'
           default: 'ci-host-amd64-1a.internal.efficios.com'
-          description: 'The address of the LXD cluster to publish to'
+          description: 'The address of the incus cluster to publish to'
           required: true
           required: true
-      - string: &images_parameters_LXD_INSTANCE_PROFILE
-          name: 'LXD_INSTANCE_PROFILE'
+      - string: &images_parameters_INCUS_INSTANCE_PROFILE
+          name: 'INCUS_INSTANCE_PROFILE'
           default: 'ci-rootnode'
           default: 'ci-rootnode'
-          description: 'The LXD instance profile to use for temporary instances when building images'
+          description: 'The Incus instance profile to use for temporary instances when building images'
           required: true
       - string: &images_parameters_GIT_URL
           name: 'GIT_URL'
           required: true
       - string: &images_parameters_GIT_URL
           name: 'GIT_URL'
@@ -81,9 +81,9 @@
       - choice:
           <<: *images_parameters_IMAGE_TYPE
       - string:
       - choice:
           <<: *images_parameters_IMAGE_TYPE
       - string:
-          <<: *images_parameters_LXD_HOST
+          <<: *images_parameters_INCUS_HOST
       - string:
       - string:
-          <<: *images_parameters_LXD_INSTANCE_PROFILE
+          <<: *images_parameters_INCUS_INSTANCE_PROFILE
       - string:
           <<: *images_parameters_GIT_URL
       - string:
       - string:
           <<: *images_parameters_GIT_URL
       - string:
           name: 'DISTROBUILDER_GIT_BRANCH'
           default: 'main'
       - string:
           name: 'DISTROBUILDER_GIT_BRANCH'
           default: 'main'
       - string:
-          name: 'LXC_CI_GIT_URL'
+          name: 'INCUS_CI_GIT_URL'
           default: 'https://github.com/lxc/lxc-ci.git'
       - string:
           default: 'https://github.com/lxc/lxc-ci.git'
       - string:
-          name: 'LXC_CI_GIT_BRANCH'
+          name: 'INCUS_CI_GIT_BRANCH'
           default: 'main'
       - string:
           name: 'GO_VERSION'
           default: 'main'
       - string:
           name: 'GO_VERSION'
               passphrase-variable: SSH_PASSWORD
           - file:
               credential-id: 'f3f08275-59ef-42ff-9de5-9beafc7435b8'
               passphrase-variable: SSH_PASSWORD
           - file:
               credential-id: 'f3f08275-59ef-42ff-9de5-9beafc7435b8'
-              variable: LXD_CLIENT_CERT
+              variable: INCUS_CLIENT_CERT
           - file:
               credential-id: '0debf23b-191b-4cdf-8a25-04e9a7092a67'
           - file:
               credential-id: '0debf23b-191b-4cdf-8a25-04e9a7092a67'
-              variable: LXD_CLIENT_KEY
+              variable: INCUS_CLIENT_KEY
           - text:
               credential-id: SLES_REGISTRATION_CODE_amd64
               variable: SLES_REGISTRATION_CODE_amd64
           - text:
               credential-id: SLES_REGISTRATION_CODE_amd64
               variable: SLES_REGISTRATION_CODE_amd64
     project-type: pipeline
     parameters: '{obj:parameters}'
     IMAGE_TYPES:
     project-type: pipeline
     parameters: '{obj:parameters}'
     IMAGE_TYPES:
-      - lxd
+      - incus
       - vm
     PROFILES:
       - ci-node
       - developer
       - vm
     PROFILES:
       - ci-node
       - developer
+    sandbox: true
     dsl: !include-jinja2: pipelines/images/default.groovy
 
 - job-template:
     dsl: !include-jinja2: pipelines/images/default.groovy
 
 - job-template:
           name: 'IMAGE_TYPE_FILTER'
           choices:
             - all
           name: 'IMAGE_TYPE_FILTER'
           choices:
             - all
-            - lxd
+            - incus
             - vm
       - choice: &images_parameters_PROFILE_FILTER
           name: 'PROFILE_FILTER'
             - vm
       - choice: &images_parameters_PROFILE_FILTER
           name: 'PROFILE_FILTER'
     ARCHES:
       - amd64
     RELEASES:
     ARCHES:
       - amd64
     RELEASES:
-      # 12.5 Doesn't currently work well with LXD either as a container or a VM
+      # 12.5 Doesn't currently work well with Incus either as a container or a VM
       #   * 12.5 has systemd 228, which doesn't support cgroups v2. Hosts _could_
       #   be configured to disable the unified cgroup hierarchy in order to have
       #   this version systemd work correctly.
       #   * Running as a QEMU VM, virtio_scsi isn't correctly able to bring the
       #   * 12.5 has systemd 228, which doesn't support cgroups v2. Hosts _could_
       #   be configured to disable the unified cgroup hierarchy in order to have
       #   this version systemd work correctly.
       #   * Running as a QEMU VM, virtio_scsi isn't correctly able to bring the
-      #   virtual disks online. The version of lxd currently deployed doesn't
+      #   virtual disks online. The version of incus currently deployed doesn't
       #   support the io.bus option to use virtio-blk instead.
       # - '12.5'
       - '15.4'
       #   support the io.bus option to use virtio-blk instead.
       # - '12.5'
       - '15.4'
index ff7f4c285e030f21bd99cad4f2854b6272ebec84..96cfd772794373d7ea97c4d01f4d51f0b6d2032a 100644 (file)
           platforms: !!python/tuple [deb12-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static]
           platforms: !!python/tuple [deb12-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static]
-          ccs: !!python/tuple [clang-13, clang-14, clang-15]
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
           touchstone: ''
       - 'librseq_{version}_{buildtype}':
           buildtype: portbuild
           touchstone: ''
       - 'librseq_{version}_{buildtype}':
           buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static]
           touchstone: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static]
           touchstone: ''
           touchstone: ''
       - 'dev_review_librseq_{version}_{buildtype}':
           buildtype: portbuild
           touchstone: ''
       - 'dev_review_librseq_{version}_{buildtype}':
           buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: ''
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: ''
index ee7a4279350e41b5cf5262e6bf44c2533a5bf498..412aae4c52bcaa3496f7eb36111bbb12fb9dff93 100644 (file)
       - ansicolor: &liburcu_wrapper_ansicolor_defaults
           colormap: xterm
       - timeout: &liburcu_wrapper_timeout_defaults
       - ansicolor: &liburcu_wrapper_ansicolor_defaults
           colormap: xterm
       - timeout: &liburcu_wrapper_timeout_defaults
-          timeout: 90
-          fail: true
-          type: absolute
+          timeout: 30
+          abort: true
+          type: no-activity
+          write-description: "<h1 style=\"color:red\">This build failed due to timeout.</h1>"
       - timestamps
       - workspace-cleanup
 
       - timestamps
       - workspace-cleanup
 
     <<: *liburcu_builders_defaults
     <<: *liburcu_publishers_defaults
 
     <<: *liburcu_builders_defaults
     <<: *liburcu_publishers_defaults
 
+- job-template:
+    name: '{job_prefix}liburcu_{version}_{cctype}'
+    defaults: liburcu
+
+    <<: *liburcu_matrix_axes_defaults
+    axes:
+      - axis:
+         type: slave
+         name: platform
+         values: '{obj:platforms}'
+      - axis:
+         type: user-defined
+         name: conf
+         values: '{obj:confs}'
+      - axis:
+         type: user-defined
+         name: build
+         values: '{obj:builds}'
+      - axis:
+         type: user-defined
+         name: cc
+         values: '{obj:ccs}'
+    <<: *liburcu_builders_defaults
+    <<: *liburcu_publishers_defaults
+
 - job-template:
     name: dev_review_liburcu_{version}_{buildtype}
     defaults: liburcu
 - job-template:
     name: dev_review_liburcu_{version}_{buildtype}
     defaults: liburcu
       # Common
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: portbuild
       # Common
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: portbuild
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static, tls_fallback, debug-rcu]
           touchstone: '(build == "std") && (conf == "std") && (platform == "deb12-i386")'
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, static, tls_fallback, debug-rcu]
           touchstone: '(build == "std") && (conf == "std") && (platform == "deb12-i386")'
           touchstone: '(build == "std")'
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: elbuild
           touchstone: '(build == "std")'
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: elbuild
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
+      - '{job_prefix}liburcu_{version}_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std, static, atomic-builtins, tls_fallback, debug-rcu]
+          touchstone: '(build == "std") && (conf == "std")'
       - 'liburcu_{version}_scan-build'
       - 'liburcu_{version}_coverity':
           version: master
       - 'liburcu_{version}_scan-build'
       - 'liburcu_{version}_coverity':
           version: master
           touchstone: '(build == "std")'
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: elbuild
           touchstone: '(build == "std")'
       - '{job_prefix}liburcu_{version}_{buildtype}':
           buildtype: elbuild
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           touchstone: '(build == "std")'
index 744a712e3b24a14debc33bce469d212605aca031..f5ce833751af6c44ef8a49e44a1f641840f0f8bf 100644 (file)
       - string:
           name: 'mversion'
           default: 'master'
       - 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'
       - 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'
           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
 
 
     concurrent: true
 
index 88575157eb448c319c078ed91e7be62d09fb6edb..0e40b90ab8fdb94b4687a3ae1604729c46fccfcb 100644 (file)
     node: 'master' # Applies only to matrix flyweight task
     execution-strategy: *lttng-tools_matrix_execution-strategy_defaults
     axes:
     node: 'master' # Applies only to matrix flyweight task
     execution-strategy: *lttng-tools_matrix_execution-strategy_defaults
     axes:
-      - axis:
+      - axis: &lttng-tools_matrix_axis_root_node
          type: slave
          name: node
          values: '{obj:nodes}'
          type: slave
          name: node
          values: '{obj:nodes}'
-      - axis:
+      - axis: &lttng-tools_matrix_axis_root_platform
           <<: *lttng-tools_matrix_axis_platform
           type: user-defined
       - axis: *lttng-tools_matrix_axis_conf
           <<: *lttng-tools_matrix_axis_platform
           type: user-defined
       - axis: *lttng-tools_matrix_axis_conf
       # Always copy liburcu artifacts
       - copyartifact:
           <<: *lttng-tools_steps_copyartifact_defaults
       # Always copy liburcu artifacts
       - copyartifact:
           <<: *lttng-tools_steps_copyartifact_defaults
-          project: '{urcu_job_prefix}liburcu_${{liburcu_version}}_{buildtype}/platform=${{platform}},conf=${{liburcu_conf}},build=std'
+          project:
+            !j2: |
+              {{urcu_job_prefix}}liburcu_{%- raw -%}${liburcu_version}{%- endraw -%}
+              _{{cctype|default(buildtype)}}/platform={%- raw %}${platform}{%- endraw -%}
+              ,conf={%- raw -%}${liburcu_conf}{%- endraw -%},build=std,{%- if ccs|default(false) -%}cc={%- raw -%}${cc}{%- endraw -%},{%- endif -%}
 
       # Always copy babeltrace artifacts
       - copyartifact:
 
       # Always copy babeltrace artifacts
       - copyartifact:
           steps:
             - copyartifact:
                 <<: *lttng-tools_steps_copyartifact_defaults
           steps:
             - copyartifact:
                 <<: *lttng-tools_steps_copyartifact_defaults
-                project: '{ust_job_prefix}lttng-ust_{ustversion}_{buildtype}/liburcu_version=${{liburcu_version}},platform=${{platform}},conf=${{ust_conf}},build=std'
+                project:
+                  !j2: |
+                    {{ust_job_prefix}}lttng-ust_{{ustversion}}_{{cctype|default(buildtype)}}/liburcu_version={%- raw -%}${liburcu_version}{%- endraw -%}
+                    ,platform={%- raw %}${platform}{%- endraw -%},conf={%- raw -%}${ust_conf}{%- endraw -%}
+                    ,build=std,{% if ccs|default(false) %}cc={%- raw -%}${cc}{%- endraw -%}{% endif %}
 
       # rootbuild requires a checkout of modules
       - conditional-step:
 
       # rootbuild requires a checkout of modules
       - conditional-step:
       - inject:
           properties-file: gerrit_custom_dependencies.properties
 
       - inject:
           properties-file: gerrit_custom_dependencies.properties
 
-      # rootbuild requires a checkout of modules
+      # rootbuild requires a checkout of modules, but only
+      # when we don't depend on a specific lttng-modules change
       - conditional-step:
       - conditional-step:
-          condition-kind: regex-match
-          label: '$JOB_NAME'
-          regex: '.*_root(?:_[a-z]+)?build.*'
+          condition-kind: and
+          on-evaluation-failure: run
+          condition-operands:
+            - condition-kind: shell
+              condition-command: 'test "$GERRIT_DEP_LTTNG_MODULES" = ""'
+            - condition-kind: regex-match
+              label: '$JOB_NAME'
+              regex: '.*_root(?:_[a-z]+)?build.*'
           steps:
             - shell: |
                 #!/bin/bash
           steps:
             - shell: |
                 #!/bin/bash
             jobs: '{ust_job_prefix}lttng-ust_{version}_{buildtype}'
             result: 'success'
 
             jobs: '{ust_job_prefix}lttng-ust_{version}_{buildtype}'
             result: 'success'
 
+- job-template:
+    name: '{job_prefix}lttng-tools_{version}_{cctype}'
+    defaults: lttng-tools
+
+    <<: *lttng-tools_matrix_axes_defaults
+    axes:
+      - axis:
+          <<: *lttng-tools_matrix_axis_platform
+      - axis:
+          <<: *lttng-tools_matrix_axis_conf
+      - axis:
+          <<: *lttng-tools_matrix_axis_build
+      - axis:
+          <<: *lttng-tools_matrix_axis_liburcu_version
+      - axis:
+          <<: *lttng-tools_matrix_axis_babeltrace_version
+      - axis:
+          type: user-defined
+          name: cc
+          values: '{obj:ccs}'
+
+    <<: *lttng-tools_builders_defaults
+    <<: *lttng-tools_publishers_defaults
+
+    triggers:
+      - pollscm: *lttng-tools_trigger_pollscm_default
+      - reverse:
+            jobs: '{ust_job_prefix}lttng-ust_{version}_{cctype}'
+            result: 'success'
+
 - job-template:
     name: 'dev_{user}_lttng-tools_{version}_{buildtype}'
     defaults: lttng-tools
 - job-template:
     name: 'dev_{user}_lttng-tools_{version}_{buildtype}'
     defaults: lttng-tools
             jobs: '{ust_job_prefix}lttng-ust_{version}_{buildtype}'
             result: 'success'
 
             jobs: '{ust_job_prefix}lttng-ust_{version}_{buildtype}'
             result: 'success'
 
+- job-template:
+    name: '{job_prefix}lttng-tools_{version}_root_{cctype}'
+    defaults: lttng-tools
+
+    scm:
+      - git: *lttng-tools_scm_git_default
+
+    wrappers:
+      - ansicolor: *lttng-tools_wrapper_ansicolor_defaults
+      - timeout:
+          <<: *lttng-tools_wrapper_timeout_defaults
+          timeout: 10
+      - timestamps
+
+    <<: *lttng-tools_matrix_axes_rootbuild
+    axes:
+      - axis:
+          <<: *lttng-tools_matrix_axis_root_node
+      - axis:
+          <<: *lttng-tools_matrix_axis_root_platform
+      - axis:
+          <<: *lttng-tools_matrix_axis_conf
+      - axis:
+          <<: *lttng-tools_matrix_axis_build
+      - axis:
+          <<: *lttng-tools_matrix_axis_liburcu_version
+      - axis:
+          <<: *lttng-tools_matrix_axis_babeltrace_version
+      - axis:
+          type: user-defined
+          name: cc
+          values: '{obj:ccs}'
+    <<: *lttng-tools_builders_defaults
+    <<: *lttng-tools_publishers_rootbuild
+
+    triggers:
+      - pollscm: *lttng-tools_trigger_pollscm_default
+      - reverse:
+            jobs: '{ust_job_prefix}lttng-ust_{version}_{cctype}'
+            result: 'success'
+
 - job-template:
     name: '{job_prefix}lttng-tools_{version}_macosbuild'
     defaults: lttng-tools
 - job-template:
     name: '{job_prefix}lttng-tools_{version}_macosbuild'
     defaults: lttng-tools
           basedir: src/lttng-tools
           skip-tag: true
 
           basedir: src/lttng-tools
           skip-tag: true
 
-    triggers:
+    triggers: &lttng-tools_triggers_review_default
       - gerrit: &lttng-tools_trigger_gerrit_default
           trigger-on:
             - comment-added-event:
       - gerrit: &lttng-tools_trigger_gerrit_default
           trigger-on:
             - comment-added-event:
                 - branch-compare-type: 'PLAIN'
                   branch-pattern: '{version}'
 
                 - branch-compare-type: 'PLAIN'
                   branch-pattern: '{version}'
 
-    properties:
+    properties: &lttng-tools_properties_review_defaults
       - inject: *lttng-tools_property_inject_defaults
       - build-discarder:
           days-to-keep: 1
       - inject: *lttng-tools_property_inject_defaults
       - build-discarder:
           days-to-keep: 1
     <<: *lttng-tools_matrix_axes_defaults
     <<: *lttng-tools_builders_review
 
     <<: *lttng-tools_matrix_axes_defaults
     <<: *lttng-tools_builders_review
 
-    publishers:
+    publishers: &lttng-tools_publishers_review_defaults
       # On build abort (timeout), wait 10 seconds before running the other post
       # build scripts, this will allow the processes to terminate and make the
       # build log more legible.
       # On build abort (timeout), wait 10 seconds before running the other post
       # build scripts, this will allow the processes to terminate and make the
       # build log more legible.
       - workspace-cleanup: *lttng-tools_publisher_workspace-cleanup_defaults
       - raw: *lttng-tools_publisher_proc-cleaner_defaults
 
       - workspace-cleanup: *lttng-tools_publisher_workspace-cleanup_defaults
       - raw: *lttng-tools_publisher_proc-cleaner_defaults
 
+- job-template:
+    name: 'dev_review_lttng-tools_{version}_{cctype}'
+    defaults: lttng-tools
+    concurrent: true
+    <<: *lttng-tools_matrix_axes_defaults
+    axes:
+      - axis:
+          <<: *lttng-tools_matrix_axis_platform
+      - axis:
+          <<: *lttng-tools_matrix_axis_conf
+      - axis:
+          <<: *lttng-tools_matrix_axis_build
+      - axis:
+          <<: *lttng-tools_matrix_axis_liburcu_version
+      - axis:
+          <<: *lttng-tools_matrix_axis_babeltrace_version
+      - axis:
+          type: user-defined
+          name: cc
+          values: '{obj:ccs}'
+
+    <<: *lttng-tools_builders_review
+    <<: *lttng-tools_publishers_defaults
+    properties: *lttng-tools_properties_review_defaults
+    publishers: *lttng-tools_publishers_review_defaults
+    scm:
+      - git: *lttng-tools_scm_git_review
+    triggers: *lttng-tools_triggers_review_default
+
 - job-template:
     name: dev_review_lttng-tools_{version}_smokebuild
     defaults: lttng-tools
 - job-template:
     name: dev_review_lttng-tools_{version}_smokebuild
     defaults: lttng-tools
       - archive: *lttng-tools_publisher_archive_defaults
       - workspace-cleanup: *lttng-tools_publisher_workspace-cleanup_defaults
 
       - archive: *lttng-tools_publisher_archive_defaults
       - workspace-cleanup: *lttng-tools_publisher_workspace-cleanup_defaults
 
+- job-template:
+    name: 'dev_review_lttng-tools_{version}_root_{cctype}'
+    defaults: lttng-tools
+    concurrent: true
+    <<: *lttng-tools_matrix_axes_rootbuild
+    axes:
+      - axis:
+          <<: *lttng-tools_matrix_axis_root_node
+      - axis:
+          <<: *lttng-tools_matrix_axis_root_platform
+      - axis:
+          <<: *lttng-tools_matrix_axis_conf
+      - axis:
+          <<: *lttng-tools_matrix_axis_build
+      - axis:
+          <<: *lttng-tools_matrix_axis_liburcu_version
+      - axis:
+          <<: *lttng-tools_matrix_axis_babeltrace_version
+      - axis:
+          type: user-defined
+          name: cc
+          values: '{obj:ccs}'
+
+    <<: *lttng-tools_builders_review
+    <<: *lttng-tools_publishers_defaults
+    properties: *lttng-tools_properties_review_defaults
+    publishers: *lttng-tools_publishers_review_defaults
+    scm:
+      - git: *lttng-tools_scm_git_review
+    triggers: *lttng-tools_triggers_review_default
+
 - job-template:
     name: 'dev_review_lttng-tools_{version}_check-format'
     defaults: lttng-tools
 - job-template:
     name: 'dev_review_lttng-tools_{version}_check-format'
     defaults: lttng-tools
           buildtype: portbuild
           version: master
           ustversion: master
           buildtype: portbuild
           version: master
           ustversion: master
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [master]
           buildtype: elbuild
           version: master
           ustversion: master
           buildtype: elbuild
           version: master
           ustversion: master
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [master]
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
+      - '{job_prefix}lttng-tools_{version}_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: master
+          ustversion: master
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std]
+          urcuversions: !!python/tuple [master]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: ''
+          touchstone: ''
       - '{job_prefix}lttng-tools_{version}_long_regression':
           buildtype: linuxbuild
           version: master
       - '{job_prefix}lttng-tools_{version}_long_regression':
           buildtype: linuxbuild
           version: master
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="el8-amd64-rootnode" && platform=="el8-amd64")'
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="el8-amd64-rootnode" && platform=="el8-amd64")'
           touchstone: ''
+      - '{job_prefix}lttng-tools_{version}_root_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: master
+          ustversion: master
+          platforms: !!python/tuple [deb12-amd64]
+          nodes: !!python/tuple [deb12-amd64-rootnode]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [agents]
+          urcuversions: !!python/tuple [master]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: '(node=="deb12-amd64-rootnode" && platform=="deb12-amd64")'
+          touchstone: ''
       - 'lttng-tools_{version}_scan-build':
           version: master
           urcuversion: master
       - 'lttng-tools_{version}_scan-build':
           version: master
           urcuversion: master
           buildtype: portbuild
           version: stable-2.13
           ustversion: stable-2.13
           buildtype: portbuild
           version: stable-2.13
           ustversion: stable-2.13
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           buildtype: elbuild
           version: stable-2.13
           ustversion: stable-2.13
           buildtype: elbuild
           version: stable-2.13
           ustversion: stable-2.13
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [stable-0.13]
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
+      - '{job_prefix}lttng-tools_{version}_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: stable-2.13
+          ustversion: stable-2.13
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std]
+          urcuversions: !!python/tuple [stable-0.13]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: ''
+          touchstone: ''
       - '{job_prefix}lttng-tools_{version}_long_regression':
           buildtype: linuxbuild
           version: stable-2.13
       - '{job_prefix}lttng-tools_{version}_long_regression':
           buildtype: linuxbuild
           version: stable-2.13
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="el8-amd64-rootnode" && platform=="el8-amd64")'
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="el8-amd64-rootnode" && platform=="el8-amd64")'
           touchstone: ''
+      - '{job_prefix}lttng-tools_{version}_root_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: stable-2.13
+          ustversion: stable-2.13
+          platforms: !!python/tuple [deb12-amd64]
+          nodes: !!python/tuple [deb12-amd64-rootnode]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [agents]
+          urcuversions: !!python/tuple [master]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: '(node=="deb12-amd64-rootnode" && platform=="deb12-amd64")'
+          touchstone: ''
       - 'lttng-tools_{version}_release':
           version: v2.13
           ustversion: stable-2.13
       - 'lttng-tools_{version}_release':
           version: v2.13
           ustversion: stable-2.13
           buildtype: portbuild
           version: stable-2.12
           ustversion: stable-2.12
           buildtype: portbuild
           version: stable-2.12
           ustversion: stable-2.12
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           buildtype: elbuild
           version: stable-2.12
           ustversion: stable-2.12
           buildtype: elbuild
           version: stable-2.12
           ustversion: stable-2.12
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           urcuversions: !!python/tuple [stable-0.13]
           buildtype: portbuild
           version: master-staging
           ustversion: master
           buildtype: portbuild
           version: master-staging
           ustversion: master
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [master]
           buildtype: portbuild
           version: stable-2.13-staging
           ustversion: stable-2.13
           buildtype: portbuild
           version: stable-2.13-staging
           ustversion: stable-2.13
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           buildtype: portbuild
           version: stable-2.12-staging
           ustversion: stable-2.12
           buildtype: portbuild
           version: stable-2.12-staging
           ustversion: stable-2.12
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, no-ust, agents]
           urcuversions: !!python/tuple [stable-0.13]
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: ''
           touchstone: ''
+      - 'dev_review_lttng-tools_{version}_{cctype}':
+          version: master
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std]
+          urcuversions: !!python/tuple [stable-0.14]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: ''
+          touchstone: ''
       - 'dev_review_lttng-tools_{version}_{buildtype}':
           version: master
           buildtype: slesbuild
       - 'dev_review_lttng-tools_{version}_{buildtype}':
           version: master
           buildtype: slesbuild
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="deb12-amd64-rootnode" && platform=="deb12-amd64")'
           touchstone: ''
           babelversions: !!python/tuple [stable-2.0]
           filter: '(node=="deb12-amd64-rootnode" && platform=="deb12-amd64")'
           touchstone: ''
+      - 'dev_review_lttng-tools_{version}_root_{cctype}':
+          version: master
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          nodes: !!python/tuple [deb12-amd64-rootnode]
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [agents]
+          urcuversions: !!python/tuple [stable-0.14]
+          babelversions: !!python/tuple [stable-2.0]
+          filter: '(node=="deb12-amd64-rootnode" && platform=="deb12-amd64")'
+          touchstone: ''
       - 'dev_review_lttng-tools_{version}_root_{buildtype}':
           version: master
           buildtype: slesbuild
       - 'dev_review_lttng-tools_{version}_root_{buildtype}':
           version: master
           buildtype: slesbuild
index ee35d1da414dc38a447f05893f701635fa05615f..9ecb82e63fba46ca7cae62ca6ff8009df46c31d9 100644 (file)
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
-          project: '{job_prefix}liburcu_${{liburcu_version}}_{buildtype}/platform=${{platform}},conf=${{liburcu_conf}},build=std'
+          project:
+            !j2: |
+              {{job_prefix}}liburcu_{%- raw -%}${liburcu_version}{%- endraw -%}
+              _{{cctype|default(buildtype)}}/platform={%- raw %}${platform}{%- endraw -%}
+              ,build=std,conf={%- raw -%}${liburcu_conf}{%- endraw -%}
+              {%- if ccs|default(false) %},cc={%- raw -%}${cc}{%- endraw -%}{% endif -%}
 
       # Run the build
       - shell:
 
       # Run the build
       - shell:
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
-          project: 'liburcu_${{liburcu_version}}_{buildtype}/platform=${{platform}},conf=${{liburcu_conf}},build=std'
+          project:
+            !j2: |
+              liburcu_{%- raw -%}${liburcu_version}{%- endraw -%}
+              _{{cctype|default(buildtype)}}/platform={%- raw %}${platform}{%- endraw -%}
+              ,build=std,conf={%- raw -%}${liburcu_conf}{%- endraw -%}
+              {%- if ccs|default(false) %},cc={%- raw -%}${cc}{%- endraw -%}{% endif -%}
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
 
       - copyartifact:
           <<: *lttng-ust_steps_copyartifact_defaults
     <<: *lttng-ust_builders_defaults
     <<: *lttng-ust_publishers_defaults
 
     <<: *lttng-ust_builders_defaults
     <<: *lttng-ust_publishers_defaults
 
+- job-template:
+    name: '{job_prefix}lttng-ust_{version}_{cctype}'
+    defaults: lttng-ust
+    <<: *lttng-ust_matrix_axes_defaults
+    axes:
+      - axis:
+          <<: *lttng-ust_matrix_axis_platform
+      - axis:
+          <<: *lttng-ust_matrix_axis_conf
+      - axis:
+          <<: *lttng-ust_matrix_axis_build
+      - axis:
+          <<: *lttng-ust_matrix_axis_liburcu_version
+      - axis:
+         type: user-defined
+         name: cc
+         values: '{obj:ccs}'
+
+    <<: *lttng-ust_builders_defaults
+    <<: *lttng-ust_publishers_defaults
 
 - job-template:
     name: dev_review_lttng-ust_{version}_{buildtype}
     defaults: lttng-ust
     concurrent: true
 
 
 - job-template:
     name: dev_review_lttng-ust_{version}_{buildtype}
     defaults: lttng-ust
     concurrent: true
 
-    scm:
+    scm: &lttng-ust_dev_review_scm
       - git:
           url: https://review.lttng.org/lttng-ust
           refspec: 'refs/changes/*:refs/changes/*'
       - git:
           url: https://review.lttng.org/lttng-ust
           refspec: 'refs/changes/*:refs/changes/*'
           basedir: src/lttng-ust
           skip-tag: true
 
           basedir: src/lttng-ust
           skip-tag: true
 
-    triggers:
+    triggers: &lttng-ust_dev_review_triggers
       - gerrit: &lttng-ust_trigger_gerrit_defaults
           trigger-on:
             - comment-added-event:
       - gerrit: &lttng-ust_trigger_gerrit_defaults
           trigger-on:
             - comment-added-event:
     <<: *lttng-ust_builders_defaults
     <<: *lttng-ust_publishers_review
 
     <<: *lttng-ust_builders_defaults
     <<: *lttng-ust_publishers_review
 
-    properties:
+    properties: &lttng-ust_dev_review_properties
       - inject:
           properties-content: |
             PROJECT_NAME=lttng-ust
       - inject:
           properties-content: |
             PROJECT_NAME=lttng-ust
           categories:
             - 'gerrit-{buildtype}'
 
           categories:
             - 'gerrit-{buildtype}'
 
+- job-template:
+    name: 'dev_review_lttng-ust_{version}_{cctype}'
+    defaults: lttng-ust
+    concurrent: true
+    scm: *lttng-ust_dev_review_scm
+    triggers: *lttng-ust_dev_review_triggers
+    properties: *lttng-ust_dev_review_properties
+    <<: *lttng-ust_matrix_axes_defaults
+    axes:
+      - axis:
+          <<: *lttng-ust_matrix_axis_platform
+      - axis:
+          <<: *lttng-ust_matrix_axis_conf
+      - axis:
+          <<: *lttng-ust_matrix_axis_build
+      - axis:
+          <<: *lttng-ust_matrix_axis_liburcu_version
+      - axis:
+         type: user-defined
+         name: cc
+         values: '{obj:ccs}'
+    <<: *lttng-ust_builders_defaults
+    <<: *lttng-ust_publishers_review
 
 - job-template:
     name: dev_review_lttng-ust_lttng-tools_{version}_{buildtype}
 
 - job-template:
     name: dev_review_lttng-ust_lttng-tools_{version}_{buildtype}
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: master
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: master
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: master
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: master
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           filter: ''
           touchstone: ''
           liburcu_versions: !!python/tuple [stable-0.13, master]
           filter: ''
           touchstone: ''
+      - '{job_prefix}lttng-ust_{version}_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: master
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [std, agents]
+          liburcu_versions: !!python/tuple [stable-0.13, stable-0.14, master]
+          filter: ''
+          touchstone: ''
       - 'lttng-ust_{version}_scan-build':
           version: master
       - 'lttng-ust_{version}_coverity':
       - 'lttng-ust_{version}_scan-build':
           version: master
       - 'lttng-ust_{version}_coverity':
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: stable-2.13
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: stable-2.13
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: stable-2.13
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: stable-2.13
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           filter: ''
           touchstone: ''
           liburcu_versions: !!python/tuple [stable-0.13, master]
           filter: ''
           touchstone: ''
+      - '{job_prefix}lttng-ust_{version}_{cctype}':
+          buildtype: linuxbuild
+          cctype: clangbuild
+          ccs: !!python/tuple [clang-13, clang-14, clang-15, clang-16]
+          version: stable-2.13
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std]
+          confs: !!python/tuple [agents]
+          liburcu_versions: !!python/tuple [stable-0.13, stable-0.14, master]
+          filter: ''
+          touchstone: ''
       - 'lttng-ust_{version}_scan-build':
           version: stable-2.13
 
       - 'lttng-ust_{version}_scan-build':
           version: stable-2.13
 
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: stable-2.12
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           version: stable-2.12
-          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb12-i386]
+          platforms: !!python/tuple [deb12-armhf, deb12-arm64, deb12-ppc64el, deb13-riscv64, deb12-i386]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std, agents]
           liburcu_versions: !!python/tuple [stable-0.13, master]
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: stable-2.12
       - '{job_prefix}lttng-ust_{version}_{buildtype}':
           buildtype: elbuild
           version: stable-2.12
-          platforms: !!python/tuple [el7-amd64, el8-amd64, el9-amd64, el7-arm64, el8-arm64, el9-arm64]
+          platforms: !!python/tuple [el8-amd64, el9-amd64, el8-arm64, el9-arm64]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13]
           builds: !!python/tuple [std]
           confs: !!python/tuple [std]
           liburcu_versions: !!python/tuple [stable-0.13]
           liburcu_versions: !!python/tuple [stable-0.14]
           filter: ''
           touchstone: ''
           liburcu_versions: !!python/tuple [stable-0.14]
           filter: ''
           touchstone: ''
+      - 'dev_review_lttng-ust_{version}_{cctype}':
+          cctype: clangbuild
+          ccs: ['clang-13', 'clang-14', 'clang-15', 'clang-16']
+          version: master
+          buildtype: linuxbuild
+          platforms: !!python/tuple [deb12-amd64]
+          builds: !!python/tuple [std, oot, dist, oot-dist]
+          confs: !!python/tuple [std, agents]
+          filter: ''
+          touchstone: ''
+          liburcu_versions: !!python/tuple [stable-0.14]
+          babeltrace_version: stable-2.0
 
       ## Stable 2.13 ##
       - 'dev_review_lttng-ust_{version}_{buildtype}':
 
       ## Stable 2.13 ##
       - 'dev_review_lttng-ust_{version}_{buildtype}':
index fea1d13655e2057a54f533c2eb984315e03d0032..a4e9538cd1f8aa3b392fe11a9148866c4f5ef468 100644 (file)
@@ -31,13 +31,13 @@ REQUIRED_VARIABLES=(
     VARIANT
     GIT_BRANCH
     GIT_URL
     VARIANT
     GIT_BRANCH
     GIT_URL
-    LXD_CLIENT_CERT
-    LXD_CLIENT_KEY
+    INCUS_CLIENT_CERT
+    INCUS_CLIENT_KEY
     TEST
     DISTROBUILDER_GIT_URL
     DISTROBUILDER_GIT_BRANCH
     TEST
     DISTROBUILDER_GIT_URL
     DISTROBUILDER_GIT_BRANCH
-    LXC_CI_GIT_URL
-    LXC_CI_GIT_BRANCH
+    INCUS_CI_GIT_URL
+    INCUS_CI_GIT_BRANCH
     GO_VERSION
 )
 MISSING_VARS=0
     GO_VERSION
 )
 MISSING_VARS=0
@@ -55,26 +55,26 @@ fi
 INSTANCE_START_TIMEOUT="${INSTANCE_START_TIMEOUT:-120}"
 VM_ARG=()
 
 INSTANCE_START_TIMEOUT="${INSTANCE_START_TIMEOUT:-120}"
 VM_ARG=()
 
-# Install lxd-client
+# Install incus-client
 apt-get update
 apt-get update
-apt-get install -y lxd-client
-mkdir -p ~/.config/lxc
-cp "${LXD_CLIENT_CERT}" ~/.config/lxc/client.crt
-cp "${LXD_CLIENT_KEY}" ~/.config/lxc/client.key
+apt-get install -y incus-client
+mkdir -p ~/.config/incus
+cp "${INCUS_CLIENT_CERT}" ~/.config/incus/client.crt
+cp "${INCUS_CLIENT_KEY}" ~/.config/incus/client.key
 CLEANUP+=(
 CLEANUP+=(
-    "rm -f ${HOME}/.config/lxc/client.crt"
-    "rm -f ${HOME}/.config/lxc/client.key"
+    "rm -f ${HOME}/.config/incus/client.crt"
+    "rm -f ${HOME}/.config/incus/client.key"
 )
 )
-lxc remote add ci --accept-certificate --auth-type tls "${LXD_HOST}"
-lxc remote switch ci
+incus remote add ci --accept-certificate --auth-type tls "${INCUS_HOST}"
+incus remote switch ci
 
 
-# Exit gracefully if the lxc images: provides the base image
+# Exit gracefully if the incus images: provides the base image
 IMAGE_NAME="${OS}/${RELEASE}/${VARIANT}/${ARCH}"
 TYPE_FILTER='type=container'
 if [[ "${IMAGE_TYPE}" == "vm" ]] ; then
     TYPE_FILTER='type=virtual-machine'
 fi
 IMAGE_NAME="${OS}/${RELEASE}/${VARIANT}/${ARCH}"
 TYPE_FILTER='type=container'
 if [[ "${IMAGE_TYPE}" == "vm" ]] ; then
     TYPE_FILTER='type=virtual-machine'
 fi
-if [[ "$(lxc image list -f csv images:"${IMAGE_NAME}" -- "${TYPE_FILTER}" | wc -l)" != "0" ]] ; then
+if [[ "$(incus image list -f csv images:"${IMAGE_NAME}" -- "${TYPE_FILTER}" | wc -l)" != "0" ]] ; then
     echo "Image '${IMAGE_NAME}' provided by 'images:' remote"
     exit 0
 fi
     echo "Image '${IMAGE_NAME}' provided by 'images:' remote"
     exit 0
 fi
@@ -97,13 +97,13 @@ PATH="${PATH}:${HOME}/go/bin"
 cd "${WORKSPACE}"
 git clone --branch="${GIT_BRANCH}" "${GIT_URL}" ci
 
 cd "${WORKSPACE}"
 git clone --branch="${GIT_BRANCH}" "${GIT_URL}" ci
 
-# Get the LXC CI repo
+# Get the INCUS CI repo
 cd "${WORKSPACE}"
 cd "${WORKSPACE}"
-git clone --branch="${LXC_CI_GIT_BRANCH}" "${LXC_CI_GIT_URL}" lxc-ci
+git clone --branch="${INCUS_CI_GIT_BRANCH}" "${INCUS_CI_GIT_URL}" incus-ci
 
 IMAGE_DIRS=(
     "${WORKSPACE}/ci/automation/images"
 
 IMAGE_DIRS=(
     "${WORKSPACE}/ci/automation/images"
-    "${WORKSPACE}/lxc-ci/images"
+    "${WORKSPACE}/incus-ci/images"
 )
 EXTENSIONS=(
     'yml'
 )
 EXTENSIONS=(
     'yml'
@@ -179,7 +179,7 @@ if [[ "${IMAGE_TYPE}" == "vm" ]] ; then
     ROOTFS="${BUILD_DIR}/disk.qcow2"
 fi
 
     ROOTFS="${BUILD_DIR}/disk.qcow2"
 fi
 
-# Work-around for lxd not using qemu-system-i386: set the architecture to x86_64
+# Work-around for incus not using qemu-system-i386: set the architecture to x86_64
 # which will use qemu-system-x86_64 and still run 32bit userspace/kernels fine.
 if [[ "${ARCH}" == "i386" ]] ; then
     TMP_DIR=$(mktemp -d)
 # which will use qemu-system-x86_64 and still run 32bit userspace/kernels fine.
 if [[ "${ARCH}" == "i386" ]] ; then
     TMP_DIR=$(mktemp -d)
@@ -191,12 +191,12 @@ if [[ "${ARCH}" == "i386" ]] ; then
     rm -rf "${TMP_DIR}"
 fi
 
     rm -rf "${TMP_DIR}"
 fi
 
-# When using `lxc image import` two images cannot have the same alias -
+# When using `incus image import` two images cannot have the same alias -
 # only the last image imported will keep the alias. Therefore, the
 # image type is appended as part of the alias.
 IMAGE_NAME="${IMAGE_NAME}/${IMAGE_TYPE}"
 
 # only the last image imported will keep the alias. Therefore, the
 # image type is appended as part of the alias.
 IMAGE_NAME="${IMAGE_NAME}/${IMAGE_TYPE}"
 
-if FINGERPRINT=$(lxc image import "${BUILD_DIR}/incus.tar.xz" "${ROOTFS}" 2>&1 | grep -E -o '[A-Fa-f0-9]{64}') ; then
+if FINGERPRINT=$(incus image import "${BUILD_DIR}/incus.tar.xz" "${ROOTFS}" 2>&1 | grep -E -o '[A-Fa-f0-9]{64}') ; then
     echo "Image imported with fingerprint '${FINGERPRINT}'"
 else
     fail 1 "No fingerprint for imported image"
     echo "Image imported with fingerprint '${FINGERPRINT}'"
 else
     fail 1 "No fingerprint for imported image"
@@ -205,10 +205,10 @@ fi
 if [[ "${TEST}" == "true" ]] ; then
     set +e
     INSTANCE_NAME=''
 if [[ "${TEST}" == "true" ]] ; then
     set +e
     INSTANCE_NAME=''
-    if INSTANCE_NAME="$(lxc -q launch -e ${VM_ARG[@]} -p default -p "${LXD_INSTANCE_PROFILE}" "${FINGERPRINT}")" ; then
+    if INSTANCE_NAME="$(incus -q launch -e ${VM_ARG[@]} -p default -p "${INCUS_INSTANCE_PROFILE}" "${FINGERPRINT}")" ; then
         INSTANCE_NAME="$(echo "${INSTANCE_NAME}" | cut -d':' -f2 | tr -d ' ')"
         CLEANUP+=(
         INSTANCE_NAME="$(echo "${INSTANCE_NAME}" | cut -d':' -f2 | tr -d ' ')"
         CLEANUP+=(
-            "lxc stop -f ${INSTANCE_NAME}"
+            "incus stop -f ${INSTANCE_NAME}"
         )
     else
         fail 1 "Failed to launch instance using image '${FINGERPRINT}'"
         )
     else
         fail 1 "Failed to launch instance using image '${FINGERPRINT}'"
@@ -216,18 +216,18 @@ if [[ "${TEST}" == "true" ]] ; then
     TIME_REMAINING="${INSTANCE_START_TIMEOUT}"
     INSTANCE_STATUS=''
     while true ; do
     TIME_REMAINING="${INSTANCE_START_TIMEOUT}"
     INSTANCE_STATUS=''
     while true ; do
-        INSTANCE_STATUS="$(lxc exec "${INSTANCE_NAME}" hostname)"
+        INSTANCE_STATUS="$(incus exec "${INSTANCE_NAME}" hostname)"
         if [[ "${INSTANCE_STATUS}" == "${INSTANCE_NAME}" ]] ; then
             break
         fi
         sleep 1
         TIME_REMAINING=$((TIME_REMAINING - 1))
         if [ "${TIME_REMAINING}" -lt "0" ] ; then
         if [[ "${INSTANCE_STATUS}" == "${INSTANCE_NAME}" ]] ; then
             break
         fi
         sleep 1
         TIME_REMAINING=$((TIME_REMAINING - 1))
         if [ "${TIME_REMAINING}" -lt "0" ] ; then
-            fail 1 "Timed out waiting for instance to become available via 'lxc exec'"
+            fail 1 "Timed out waiting for instance to become available via 'incus exec'"
         fi
     done
     set -e
 fi
 
         fi
     done
     set -e
 fi
 
-lxc image alias delete "${IMAGE_NAME}" || true
-lxc image alias create "${IMAGE_NAME}" "${FINGERPRINT}"
+incus image alias delete "${IMAGE_NAME}" || true
+incus image alias create "${IMAGE_NAME}" "${FINGERPRINT}"
index befc9bf0fb2f1e302b0901f486f9246c686b71ae..c7233d7cbdca23b65ec1d937bc60ad709f75d6e6 100644 (file)
@@ -32,8 +32,8 @@ REQUIRED_VARIABLES=(
     PROFILE         # The ansible group to apply to the new image
     GIT_BRANCH      # The git branch of the automation repo to checkout
     GIT_URL         # The git URL of the automation repo to checkout
     PROFILE         # The ansible group to apply to the new image
     GIT_BRANCH      # The git branch of the automation repo to checkout
     GIT_URL         # The git URL of the automation repo to checkout
-    LXD_CLIENT_CERT # Path to LXD client certificate
-    LXD_CLIENT_KEY  # Path to LXD client certificate key
+    INCUS_CLIENT_CERT # Path to INCUS client certificate
+    INCUS_CLIENT_KEY  # Path to INCUS client certificate key
     SSH_PRIVATE_KEY # Path to SSH private key
     TEST            # 'true' to test launching published image
 )
     SSH_PRIVATE_KEY # Path to SSH private key
     TEST            # 'true' to test launching published image
 )
@@ -53,18 +53,18 @@ INSTANCE_START_TIMEOUT="${INSTANCE_START_TIMEOUT:-120}"
 NETWORK_SLEEP="${NETWORK_SLEEP:-15}"
 
 # Dependencies
 NETWORK_SLEEP="${NETWORK_SLEEP:-15}"
 
 # Dependencies
-apt-get -y install lxd-client ansible jq
+apt-get -y install incus-client ansible jq
 
 # Configuration
 
 # Configuration
-mkdir -p ~/.config/lxc
-cp "${LXD_CLIENT_CERT}" ~/.config/lxc/client.crt
-cp "${LXD_CLIENT_KEY}" ~/.config/lxc/client.key
+mkdir -p ~/.config/incus
+cp "${INCUS_CLIENT_CERT}" ~/.config/incus/client.crt
+cp "${INCUS_CLIENT_KEY}" ~/.config/incus/client.key
 CLEANUP+=(
 CLEANUP+=(
-    "rm -f ${HOME}/.config/lxc/client.crt"
-    "rm -f ${HOME}/.config/lxc/client.key"
+    "rm -f ${HOME}/.config/incus/client.crt"
+    "rm -f ${HOME}/.config/incus/client.key"
 )
 )
-lxc remote add ci --accept-certificate --auth-type tls "${LXD_HOST}"
-lxc remote switch ci
+incus remote add ci --accept-certificate --auth-type tls "${INCUS_HOST}"
+incus remote switch ci
 
 # Clone lttng-ci
 git clone -b "${GIT_BRANCH}" "${GIT_URL}" ci
 
 # Clone lttng-ci
 git clone -b "${GIT_BRANCH}" "${GIT_URL}" ci
@@ -91,9 +91,9 @@ set +e
 TRIES_MAX=3
 TRIES=0
 while [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; do
 TRIES_MAX=3
 TRIES=0
 while [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; do
-    if ! INSTANCE_NAME=$(lxc -q launch "${VM_ARG[@]}" -p default -p "${LXD_INSTANCE_PROFILE}" "${SOURCE_IMAGE_NAME}/${IMAGE_TYPE}") ; then
+    if ! INSTANCE_NAME=$(incus -q launch "${VM_ARG[@]}" -p default -p "${INCUS_INSTANCE_PROFILE}" "${SOURCE_IMAGE_NAME}/${IMAGE_TYPE}") ; then
         # Try from images
         # Try from images
-        if ! INSTANCE_NAME=$(lxc -q launch "${VM_ARG[@]}" -p default -p "${LXD_INSTANCE_PROFILE}" images:"${SOURCE_IMAGE_NAME}") ; then
+        if ! INSTANCE_NAME=$(incus -q launch "${VM_ARG[@]}" -p default -p "${INCUS_INSTANCE_PROFILE}" images:"${SOURCE_IMAGE_NAME}") ; then
             TRIES=$((TRIES + 1))
             echo "Failed to deployed ephemereal instance attempt ${TRIES}/${TRIES_MAX}"
             if [[ "${TRIES}" -lt  "${TRIES_MAX}" ]] ; then
             TRIES=$((TRIES + 1))
             echo "Failed to deployed ephemereal instance attempt ${TRIES}/${TRIES_MAX}"
             if [[ "${TRIES}" -lt  "${TRIES_MAX}" ]] ; then
@@ -111,15 +111,15 @@ INSTANCE_NAME="$(echo "${INSTANCE_NAME}" | cut -d ':' -f 2 | tr -d ' ')"
 set -e
 
 CLEANUP+=(
 set -e
 
 CLEANUP+=(
-    "lxc delete -f ${INSTANCE_NAME}"
-    "lxc stop ${INSTANCE_NAME}"
+    "incus delete -f ${INSTANCE_NAME}"
+    "incus stop ${INSTANCE_NAME}"
 )
 
 # VMs may take more time to start, wait until instance is running
 TIME_REMAINING="${INSTANCE_START_TIMEOUT}"
 while true ; do
     set +e
 )
 
 # VMs may take more time to start, wait until instance is running
 TIME_REMAINING="${INSTANCE_START_TIMEOUT}"
 while true ; do
     set +e
-    INSTANCE_STATUS=$(lxc exec "${INSTANCE_NAME}" hostname)
+    INSTANCE_STATUS=$(incus exec "${INSTANCE_NAME}" hostname)
     set -e
     if [[ "${INSTANCE_STATUS}" == "${INSTANCE_NAME}" ]] ; then
         break
     set -e
     if [[ "${INSTANCE_STATUS}" == "${INSTANCE_NAME}" ]] ; then
         break
@@ -127,7 +127,7 @@ while true ; do
     sleep 1
     TIME_REMAINING=$((TIME_REMAINING - 1))
     if [ "${TIME_REMAINING}" -lt "0" ] ; then
     sleep 1
     TIME_REMAINING=$((TIME_REMAINING - 1))
     if [ "${TIME_REMAINING}" -lt "0" ] ; then
-        fail 1 "Timed out waiting for instance to become available via 'lxc exec'"
+        fail 1 "Timed out waiting for instance to become available via 'incus exec'"
     fi
 done
 
     fi
 done
 
@@ -136,7 +136,7 @@ if [[ "${VARIANT}" == "cloud" ]] ; then
     # It's possible for cloud-init to fail, but to still be able to continue.
     # Eg., a profile asks for netplan.io on a system that doesn't have that
     # package available.
     # It's possible for cloud-init to fail, but to still be able to continue.
     # Eg., a profile asks for netplan.io on a system that doesn't have that
     # package available.
-    lxc exec "${INSTANCE_NAME}" -- cloud-init status -w || true
+    incus exec "${INSTANCE_NAME}" -- cloud-init status -w || true
 fi
 
 # Wait for instance to have an ip address (@TODO: is there a better approach?)
 fi
 
 # Wait for instance to have an ip address (@TODO: is there a better approach?)
@@ -145,10 +145,10 @@ sleep "${NETWORK_SLEEP}"
 # @TODO: Handle case when iputils2 is not installed
 INSTANCE_IP=''
 POTENTIAL_INTERFACES=(eth0 enp5s0)
 # @TODO: Handle case when iputils2 is not installed
 INSTANCE_IP=''
 POTENTIAL_INTERFACES=(eth0 enp5s0)
-lxc exec "${INSTANCE_NAME}" -- ip a
+incus exec "${INSTANCE_NAME}" -- ip a
 set +e
 for interface in "${POTENTIAL_INTERFACES[@]}" ; do
 set +e
 for interface in "${POTENTIAL_INTERFACES[@]}" ; do
-    if ! DEV_INFO="$(lxc exec "${INSTANCE_NAME}" -- ip a show dev "${interface}")" ; then
+    if ! DEV_INFO="$(incus exec "${INSTANCE_NAME}" -- ip a show dev "${interface}")" ; then
         continue
     fi
     INSTANCE_IP="$(echo "${DEV_INFO}" | grep -Eo 'inet [^ ]* ' | cut -d' ' -f2 | cut -d'/' -f1)"
         continue
     fi
     INSTANCE_IP="$(echo "${DEV_INFO}" | grep -Eo 'inet [^ ]* ' | cut -d' ' -f2 | cut -d'/' -f1)"
@@ -162,7 +162,7 @@ if [[ "${INSTANCE_IP}" == "" ]] ; then
 fi
 
 ssh-keyscan "${INSTANCE_IP}" >> ~/.ssh/known_hosts2
 fi
 
 ssh-keyscan "${INSTANCE_IP}" >> ~/.ssh/known_hosts2
-#lxc exec "${INSTANCE_NAME}" -- bash -c 'for i in /etc/ssh/ssh_host_*_key ; do ssh-keygen -l -f "$i" ; done' >> "${HOME}/.ssh/known_hosts"
+#incus exec "${INSTANCE_NAME}" -- bash -c 'for i in /etc/ssh/ssh_host_*_key ; do ssh-keygen -l -f "$i" ; done' >> "${HOME}/.ssh/known_hosts"
 CLEANUP+=(
     "rm -f ${HOME}/.ssh/known_hosts2"
 )
 CLEANUP+=(
     "rm -f ${HOME}/.ssh/known_hosts2"
 )
@@ -172,10 +172,10 @@ CLEANUP+=(
     "rm -f ${HOME}/.ssh/id_rsa.pub"
     "rm -f ${HOME}/.ssh/id_rsa"
 )
     "rm -f ${HOME}/.ssh/id_rsa.pub"
     "rm -f ${HOME}/.ssh/id_rsa"
 )
-lxc file push ~/.ssh/id_rsa.pub "ci:${INSTANCE_NAME}/root/.ssh/authorized_keys2"
+incus file push ~/.ssh/id_rsa.pub "ci:${INSTANCE_NAME}/root/.ssh/authorized_keys2"
 # Some distros, eg. Rocky Linux, don't enable the use of authorized_keys2
 # by default
 # Some distros, eg. Rocky Linux, don't enable the use of authorized_keys2
 # by default
-lxc exec "ci:${INSTANCE_NAME}" -- bash -c 'if test -f /etc/redhat-release ; then sed -i "s#^AuthorizedKeysFile.*#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2#" /etc/ssh/sshd_config ; systemctl restart sshd ; fi'
+incus exec "ci:${INSTANCE_NAME}" -- bash -c 'if test -f /etc/redhat-release ; then sed -i "s#^AuthorizedKeysFile.*#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2#" /etc/ssh/sshd_config ; systemctl restart sshd ; fi'
 
 
 # Confirm working SSH connection
 
 
 # Confirm working SSH connection
@@ -202,10 +202,10 @@ LANG=C ANSIBLE_STRATEGY=linear ansible-playbook \
        -l "${INSTANCE_IP}" -i fake-inventory
 
 # Graceful shutdown
        -l "${INSTANCE_IP}" -i fake-inventory
 
 # Graceful shutdown
-lxc stop "${INSTANCE_NAME}"
+incus stop "${INSTANCE_NAME}"
 
 # Publish
 
 # Publish
-if FINGERPRINT=$(lxc publish "${INSTANCE_NAME}" 2>&1 | grep -E -o '[A-Fa-f0-9]{64}') ; then
+if FINGERPRINT=$(incus publish "${INSTANCE_NAME}" 2>&1 | grep -E -o '[A-Fa-f0-9]{64}') ; then
     echo "Published instance with fingerprint '${FINGERPRINT}'"
 else
     fail 1 "No fingerprint for published instance"
     echo "Published instance with fingerprint '${FINGERPRINT}'"
 else
     fail 1 "No fingerprint for published instance"
@@ -216,7 +216,7 @@ TRIES=0
 if [[ "${TEST}" == "true" ]] ; then
     set +e
     while [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; do
 if [[ "${TEST}" == "true" ]] ; then
     set +e
     while [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; do
-        if ! INSTANCE_NAME=$(lxc -q launch -e "${VM_ARG[@]}" -p default -p "${LXD_INSTANCE_PROFILE}" "${FINGERPRINT}")  ; then
+        if ! INSTANCE_NAME=$(incus -q launch -e "${VM_ARG[@]}" -p default -p "${INCUS_INSTANCE_PROFILE}" "${FINGERPRINT}")  ; then
             TRIES=$((TRIES + 1))
             echo "Failed to launch instance try ${TRIES}/${TRIES_MAX}"
             if [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; then
             TRIES=$((TRIES + 1))
             echo "Failed to launch instance try ${TRIES}/${TRIES_MAX}"
             if [[ "${TRIES}" -lt "${TRIES_MAX}" ]] ; then
@@ -227,7 +227,7 @@ if [[ "${TEST}" == "true" ]] ; then
         else
             INSTANCE_NAME="$(echo "${INSTANCE_NAME}" | cut -d':' -f2 | tr -d ' ')"
             CLEANUP+=(
         else
             INSTANCE_NAME="$(echo "${INSTANCE_NAME}" | cut -d':' -f2 | tr -d ' ')"
             CLEANUP+=(
-                "lxc stop -f ${INSTANCE_NAME}"
+                "incus stop -f ${INSTANCE_NAME}"
             )
             break
         fi
             )
             break
         fi
@@ -235,5 +235,5 @@ if [[ "${TEST}" == "true" ]] ; then
     set -e
 fi
 
     set -e
 fi
 
-lxc image alias delete "${TARGET_IMAGE_NAME}" || true
-lxc image alias create "${TARGET_IMAGE_NAME}" "${FINGERPRINT}"
+incus image alias delete "${TARGET_IMAGE_NAME}" || true
+incus image alias create "${TARGET_IMAGE_NAME}" "${FINGERPRINT}"
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..28f4e25
--- /dev/null
@@ -0,0 +1 @@
+[tool.black]
index 12900c74fe0e07c66ce6c649e9dd85fa31df4ec6..feea2f490a7337bad107ebaaff18e7f06211eb64 100755 (executable)
@@ -227,9 +227,9 @@ freebsd*)
     ;;
 esac
 
     ;;
 esac
 
-# Some warning flags are very dumb in GCC 4.8 on SLES12 / EL7, disable them
+# Some warning flags are very dumb in GCC 4.8 on SLES12, disable them
 # even if they are available.
 # even if they are available.
-if [[ $platform = sles12sp5* ]] || [[ $platform = el7* ]]; then
+if [[ $platform = sles12sp5* ]]; then
     CFLAGS="$CFLAGS -Wno-missing-field-initializers -Wno-shadow"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers -Wno-shadow"
 fi
     CFLAGS="$CFLAGS -Wno-missing-field-initializers -Wno-shadow"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers -Wno-shadow"
 fi
@@ -436,7 +436,7 @@ if [ "$BABELTRACE_CLANG_TIDY" = "yes" ]; then
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
-        if [[ "$filepath" =~ (\.cpp|\.hhp|\.c|\.h)$ ]]; then
+        if [[ "$filepath" =~ (\.cpp|\.hpp|\.c|\.h)$ ]]; then
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
index e17799012f0686e8fe1753d246defc306b935577..5581c35fd0b1fb76a3fcc0be466071197ab0ce4f 100755 (executable)
@@ -61,7 +61,7 @@ else
 fi
 
 if [[ -f tools/format-cpp.sh ]]; then
 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
 
     git diff --exit-code | tee ../../clang-format.out || exit_code=1
 fi
 
@@ -69,4 +69,8 @@ if [[ -f tools/shellcheck.sh ]]; then
     tools/shellcheck.sh | tee ../../shellcheck.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
 exit $exit_code
index d7ae0d1641d75edf6c52d0a8935f4d681cca79bc..40f3469457520d373ecc8108e154158f70c16ceb 100755 (executable)
@@ -133,6 +133,8 @@ PREFIX="/build"
 LIBDIR="lib"
 LIBDIR_ARCH="$LIBDIR"
 
 LIBDIR="lib"
 LIBDIR_ARCH="$LIBDIR"
 
+CONF_OPTS=()
+
 # RHEL and SLES both use lib64 but don't bother shipping a default autoconf
 # site config that matches this.
 if [[ ( -f /etc/redhat-release || -f /etc/products.d/SLES.prod || -f /etc/yocto-release ) ]]; then
 # RHEL and SLES both use lib64 but don't bother shipping a default autoconf
 # site config that matches this.
 if [[ ( -f /etc/redhat-release || -f /etc/products.d/SLES.prod || -f /etc/yocto-release ) ]]; then
@@ -206,6 +208,16 @@ freebsd*)
     export PYTHON_CONFIG="python3-config"
     ;;
 
     export PYTHON_CONFIG="python3-config"
     ;;
 
+cygwin*)
+    export MAKE=make
+    export TAR=tar
+    export NPROC=nproc
+
+    # Work around a bug in GCC's emutls on cygwin which results in a deadlock
+    # in test_perthreadlock
+    CONF_OPTS+=("--disable-compiler-tls")
+    ;;
+
 *)
     export MAKE=make
     export TAR=tar
 *)
     export MAKE=make
     export TAR=tar
@@ -234,7 +246,7 @@ PACKAGE_VERSION=${PACKAGE_VERSION//\-pre*/}
 
 # Set configure options and environment variables for each build
 # configuration.
 
 # Set configure options and environment variables for each build
 # configuration.
-CONF_OPTS=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH" "--disable-maintainer-mode")
+CONF_OPTS+=("--prefix=$PREFIX" "--libdir=$PREFIX/$LIBDIR_ARCH" "--disable-maintainer-mode")
 case "$conf" in
 static)
     print_header "Conf: Static lib only"
 case "$conf" in
 static)
     print_header "Conf: Static lib only"
@@ -378,7 +390,7 @@ if [ "$USERSPACE_RCU_CLANG_TIDY" = "yes" ]; then
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
-        if [[ "$filepath" =~ (\.cpp|\.hhp|\.c|\.h)$ ]]; then
+        if [[ "$filepath" =~ (\.cpp|\.hpp|\.c|\.h)$ ]]; then
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
index 5c515b7e8497fc83673b9a4b2be296e3808c84e2..26f9c61998d6ee57e203b43d1bd683d743aaf3c8 100644 (file)
@@ -628,16 +628,15 @@ if (elversion != null) {
     case 'jammy':
       matchStrs = [
         ~/^refs\/tags\/(Ubuntu-5\.15\.0-\d{1,3}?\.[\d]+)$/,
     case 'jammy':
       matchStrs = [
         ~/^refs\/tags\/(Ubuntu-5\.15\.0-\d{1,3}?\.[\d]+)$/,
-        ~/^refs\/tags\/(Ubuntu-hwe-6\.2-6\.2\.0-.*_22\.04\.\d+)$/,
-        ~/^refs\/tags\/(Ubuntu-hwe-6\.5-6\.5\.0-.*_22\.04\.\d+)$/,
+        ~/^refs\/tags\/(Ubuntu-hwe-6\.8-6\.8\.0-.*_22\.04\.\d+)$/,
       ]
       break
 
     case 'focal':
       matchStrs = [
         ~/^refs\/tags\/(Ubuntu-5\.4\.0-\d{1,3}?\.[\d]+)$/,
       ]
       break
 
     case 'focal':
       matchStrs = [
         ~/^refs\/tags\/(Ubuntu-5\.4\.0-\d{1,3}?\.[\d]+)$/,
-        ~/^refs\/tags\/(Ubuntu-hwe-5\.13-5\.13\.0-.*_20\.04\.\d+)$/,
         ~/^refs\/tags\/(Ubuntu-hwe-5\.15-5\.15\.0-.*_20\.04\.\d+)$/,
         ~/^refs\/tags\/(Ubuntu-hwe-5\.15-5\.15\.0-.*_20\.04\.\d+)$/,
+        ~/^refs\/tags\/(Ubuntu-hwe-6\.8-6\.8\.0-.*_20\.04\.\d+)$/,
       ]
       break
 
       ]
       break
 
index ba93fd42148fb2165c9b4cee1e2a68e11e5453bf..310e22b1e5cf7c1beff22fb6943d13e43bb2598e 100644 (file)
@@ -27,6 +27,10 @@ mgitrepo=${mgitrepo:-}
 make_args=()
 
 DEBUG=${DEBUG:-}
 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
 
 # Derive arch from label if it isn't set
 if [ -z "${arch:-}" ] ; then
@@ -83,9 +87,10 @@ print_header() {
 git_clone_modules_sources() {
     mkdir -p "$MODULES_GIT_DIR"
 
 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
         git clone --no-tags --depth=1 "${mgitrepo}" "$MODULES_GIT_DIR"
         (cd "$MODULES_GIT_DIR" && git fetch origin "${mversion}" && git checkout FETCH_HEAD)
     else
@@ -1006,13 +1011,18 @@ build_modules() {
 
     kversion=$(make -C "$LINUX_HDROBJ_DIR" -s kernelversion)
 
 
     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}"
 
     # 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"; } || \
     # 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"; } || \
index bb2b6b59e085e603b5c399c335469c299753468c..41b1fb763614c2c5111ef6650c8256f10259c382 100755 (executable)
@@ -286,9 +286,9 @@ cygwin|cygwin64|msys32|msys64)
     ;;
 esac
 
     ;;
 esac
 
-# Some warning flags are very dumb in GCC 4.8 on SLES12 / EL7, disable them
+# Some warning flags are very dumb in GCC 4.8 on SLES12, disable them
 # even if they are available.
 # even if they are available.
-if [[ $platform = sles12sp5* ]] || [[  $platform = el7* ]]; then
+if [[ $platform = sles12sp5* ]]; then
     CFLAGS="$CFLAGS -Wno-missing-field-initializers -Wno-shadow"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers -Wno-shadow"
 fi
     CFLAGS="$CFLAGS -Wno-missing-field-initializers -Wno-shadow"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers -Wno-shadow"
 fi
@@ -513,7 +513,7 @@ if [ "$LTTNG_TOOLS_CLANG_TIDY" = "yes" ]; then
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
-        if [[ "$filepath" =~ (\.cpp|\.hhp|\.c|\.h)$ ]]; then
+        if [[ "$filepath" =~ (\.cpp|\.hpp|\.c|\.h)$ ]]; then
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
@@ -609,9 +609,15 @@ if [ "$LTTNG_TOOLS_RUN_TESTS" = "yes" ] && [[ ! "$conf" =~ (no-ust|relayd-only)
             "-Dlog4j-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j.jar"
             "-Dlog4j2-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j2.jar"
             "-DargLine=-Djava.library.path=${WORKSPACE}/deps/build/${LIBDIR_ARCH}"
             "-Dlog4j-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j.jar"
             "-Dlog4j2-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j2.jar"
             "-DargLine=-Djava.library.path=${WORKSPACE}/deps/build/${LIBDIR_ARCH}"
-            '-Dgroups=!domain:log4j2'
         )
 
         )
 
+        # Merged into master ~ 47abf22b48023960069e1d3e23f42298ce4b3c2a
+        if verlt "${PACKAGE_VERSION}" "2.14" ; then
+            LTTNG_UST_JAVA_TESTS_MAVEN_OPTS+=(
+                '-Dgroups=!domain:log4j2'
+            )
+        fi
+
         env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn -version
 
         if [[ -n "${LTTNG_TOOLS_UST_JAVA_TESTS_LOG4J_API_VERSION:-}" ]] ; then
         env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn -version
 
         if [[ -n "${LTTNG_TOOLS_UST_JAVA_TESTS_LOG4J_API_VERSION:-}" ]] ; then
index 9e607bf257d5efbc7e6389fb030f588ef3e808e3..5b55c82672f2edc8838914f919a1e676aa8bc12f 100755 (executable)
@@ -59,14 +59,14 @@ git rev-list --format=%B --max-count=1 HEAD | while read -r line; do
     fi
 
     if [ "$project" = "lttng-modules" ]; then
     fi
 
     if [ "$project" = "lttng-modules" ]; then
+        if [ "$(id -u)" != "0" ]; then
+            continue
+        fi
         if [ -d "$WORKSPACE/src/lttng-modules" ]; then
             # Remove the regular modules sources to replace them with those
         if [ -d "$WORKSPACE/src/lttng-modules" ]; then
             # Remove the regular modules sources to replace them with those
-           # from the gerrit change
+            # from the gerrit change
             rm -rf "$WORKSPACE/src/lttng-modules"
             rm -rf "$WORKSPACE/src/lttng-modules"
-        else
-            # This job does not require modules sources
-            continue
-       fi
+        fi
     fi
 
     # Export the GERRIT_DEP_... into the property file for further jenkins usage
     fi
 
     # Export the GERRIT_DEP_... into the property file for further jenkins usage
index 842206cc8e9b805fe68940e28f76227c189de34b..26672ca084d4367ab9a98eef3a5680f4193c2282 100755 (executable)
@@ -370,7 +370,7 @@ if [ "$LTTNG_UST_CLANG_TIDY" = "yes" ]; then
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
 
     # Instead, run clan-tidy on all the files touched by the patch.
     while read -r filepath; do
-        if [[ "$filepath" =~ (\.cpp|\.hhp|\.c|\.h)$ ]]; then
+        if [[ "$filepath" =~ (\.cpp|\.hpp|\.c|\.h)$ ]]; then
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
             clang-tidy --fix-errors "$(realpath "$filepath")"
         fi
     done < <(git diff-tree --no-commit-id --diff-filter=d --name-only -r HEAD)
This page took 0.099398 seconds and 4 git commands to generate.