[libvirt PATCH 07/12] ci: jobs.sh: run_integration: Add/Rewrite/Reformat commentaries

Erik Skultety posted 12 patches 1 year, 1 month ago
There is a newer version of this series
[libvirt PATCH 07/12] ci: jobs.sh: run_integration: Add/Rewrite/Reformat commentaries
Posted by Erik Skultety 1 year, 1 month ago
Because of the nature of writing inline shell commands to YAML, most of
the commentaries where inlined with the command not to hinder YAML
readability any further. Since we moved the logic to a standalone
script, we can now do whatever formatting & readability adjustments we
want.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 ci/jobs.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/ci/jobs.sh b/ci/jobs.sh
index 75ea638580..37bca452fa 100644
--- a/ci/jobs.sh
+++ b/ci/jobs.sh
@@ -84,10 +84,14 @@ run_website_build() {
 run_integration() {
     sudo pip3 install --prefix=/usr avocado-framework
 
-    sudo sh -c "echo DefaultLimitCORE=infinity >> /etc/systemd/system.conf" # Explicitly allow storing cores globally
-    sudo systemctl daemon-reexec # need to reexec systemd after changing config
+    # Explicitly allow storing cores globally
+    sudo sh -c "echo DefaultLimitCORE=infinity >> /etc/systemd/system.conf"
 
-    source /etc/os-release  # in order to query the vendor-provided variables
+    # Need to reexec systemd after changing config
+    sudo systemctl daemon-reexec
+
+    # Source the os-release file to query the vendor-provided variables
+    source /etc/os-release
     if test "$ID" = "centos" && test "$VERSION_ID" -eq 8
     then
         DAEMONS="libvirtd virtlockd virtlogd"
@@ -104,6 +108,11 @@ run_integration() {
         sudo systemctl restart ${daemon}.socket
     done
 
+    # Make sure the default network is started on all platforms
+    # The reason for the '|| true' here is solely that GitLab executes all
+    # Shell scripts with -e by default and virsh returns an error if one tries
+    # to start a machine/network that is already active which is both fine and
+    # should also be a non-fatal error
     sudo virsh --quiet net-start default &>/dev/null || true
 
     cd "$SCRATCH_DIR"
-- 
2.41.0
Re: [libvirt PATCH 07/12] ci: jobs.sh: run_integration: Add/Rewrite/Reformat commentaries
Posted by Daniel P. Berrangé 1 year, 1 month ago
On Mon, Sep 18, 2023 at 12:22:43PM +0200, Erik Skultety wrote:
> Because of the nature of writing inline shell commands to YAML, most of
> the commentaries where inlined with the command not to hinder YAML
> readability any further. Since we moved the logic to a standalone
> script, we can now do whatever formatting & readability adjustments we
> want.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  ci/jobs.sh | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|