[libvirt PATCH 00/33] ci: Unify the GitLab CI jobs with local executions && adopt lcitool container executions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Technically a v2 of:
https://listman.redhat.com/archives/libvir-list/2023-February/237552.html

However, the approach here is slightly different and what that series said
about migration to lcitool container executions as a replacement for
ci/Makefile is actually done here. One of the core problems of the above
pointed out in review was that more Shell logic was introduced including CLI
parsing, conditional executions, etc. which we fought hard to get rid of in the
past. I reworked the Shell functions quite a bit and dropped whatever extra
Shell logic the original series added.
Obviously we can't get rid of Shell completely because of .gitlab-ci.yml and so
I merely extracted the recipes into functions which are then sourced as
ci/build.sh and executed. Now, that on its own would hide the actual commands
being run in the GitLab job log, so before any command is actually executed, it
is formatted with a color sequence so we don't miss that information as that
would be a regression to the status quo.

Lastly, this series then takes the effort inside the ci/build.sh script and
basically mirrors whatever GitLab would do to run a job inside a local
container which is executed by lcitool (yes, we already have that capability).

Please give this a try and I'm already looking forward to comments as I'd like
to expand this effort to local VM executions running the TCK integration tests,
so this series is quite important in that regard.

Erik Skultety (33):
  ci: build.sh: Add variables from .gitlab-ci.yml
  ci: build.sh: Add GIT_ROOT env helper variable
  ci: build.sh: Don't mention that MESON_ARGS are available via CLI
  ci: build.sh: Add a wrapper function over meson's setup
  ci: build.sh: Add a wrapper function executing 'shell' commands
  ci: build.sh: Add a wrapper function over the 'build' job
  ci: build.sh: Add a helper function to create the dist tarball
  ci: build.sh: Add a wrapper function over the 'test' job
  ci: build.sh: Add a wrapper function over the 'codestyle' job
  ci: build.sh: Add a wrapper function over the 'potfile' job
  ci: build.sh: Add a wrapper function over the 'rpmbuild' job
  ci: build.sh: Add a wrapper function over the 'website' job
  ci: build.sh: Drop changing working directory to CI_CONT_DIR
  ci: build.sh: Drop direct invocation of meson/ninja commands
  ci: build.sh: Drop MESON_ARGS definition from global level
  gitlab-ci.yml: Add 'after_script' stage to prep for artifact
    collection
  .gitlab-ci.yml: Convert the native build job to the build.sh usage
  .gitlab-ci.yml: Convert the cross build job to the build.sh usage
  .gitlab-ci.yml: Convert the website build job to the build.sh usage
  .gitlab-ci.yml: Convert the codestyle job to the build.sh usage
  .gitlab-ci.yml: Convert the potfile job to the build.sh usage
  ci: helper: Drop _lcitool_get_targets method
  ci: helper: Don't make ':' literal a static part of the image tag
  ci: helper: Add --lcitool-path CLI option
  ci: helper: Add a job argparse subparser
  ci: helper: Add a required_deps higher order helper/decorator
  ci: helper: Add Python code hangling git clones
  ci: helper: Add a helper to create a local repo clone Pythonic way
  ci: helper: Rework _lcitool_run method logic
  ci: helper: Add an action to run the container workload via lcitool
  ci: helper: Drop original actions
  ci: helper: Drop the --meson-args/--ninja-args CLI options
  ci: helper: Drop the _make_run method

 .gitlab-ci.yml |  47 +++++++------
 ci/build.sh    | 105 +++++++++++++++++++++++++----
 ci/helper      | 176 ++++++++++++++++++++++++++++---------------------
 3 files changed, 218 insertions(+), 110 deletions(-)

-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux