From nobody Sun Feb 8 19:56:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695843263; cv=none; d=zohomail.com; s=zohoarc; b=WpDr+fwtAVeyRwcpB1udwNoFoj91i5rfJt/2UzUwBiM6jJokBPgyvp5BfwJzVstEHXSarA1Z9dn5q7dmKb7FtDoHcqQ9twWcVzbBdHBt8Aj2hH7J5dfz6g/ZP6D2xX5YPYTc4psEcQK1DOduXR4xC5TaLbQNZOya1eNWkuxCJuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695843263; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MBZCIj0eDNuH9qjJO7b4NtId7efXTm6rWzp1cO2w9oc=; b=iNQKVlsw0badSvLPTP/nJNGc8WC+wlmsR5cUBoh76U2rG6/qypvEEpbXHrJyWMhPctPWK9J5xZkL1ziVZ3R+Uy1c0vyZ3a7f66Se00rlFK/P6id2vFDJrdHyr4UzsSpbKJyhzlapLMm8iDdt4zYh0V4o6xrLkeRWtAEGHQMNQkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1695843263463517.2255705913321; Wed, 27 Sep 2023 12:34:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-679-WKc_RvD1Mw6S-OVY570aWw-1; Wed, 27 Sep 2023 15:34:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A99E38125B7; Wed, 27 Sep 2023 19:34:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44D001004145; Wed, 27 Sep 2023 19:34:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1465D1946594; Wed, 27 Sep 2023 19:34:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DB5C21946587 for ; Wed, 27 Sep 2023 18:53:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D729140C6E77; Wed, 27 Sep 2023 18:53:53 +0000 (UTC) Received: from orca.home.lan (unknown [10.45.224.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5EA2A40C6EA8; Wed, 27 Sep 2023 18:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695843262; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MBZCIj0eDNuH9qjJO7b4NtId7efXTm6rWzp1cO2w9oc=; b=UuxEzrjS0XJSR1ftdncY6qI6hTZYibzlU0Hh8EMsPOKTnEph7Xxi39zPF8BBGKbvHoGzuc PhLYjbjSeQ9sRp+Z3kY1zWXKxPsphTuOW6F53dSNB5dEQjulXmXzAv8UHbPUzjKiN3kcZ1 Pr8rJw7x1SLEd7vk29YenFmxwC3BHGI= X-MC-Unique: WKc_RvD1Mw6S-OVY570aWw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH 5/7] docs: testing: Adjust the docs on how to run container workloads locally Date: Wed, 27 Sep 2023 20:53:46 +0200 Message-ID: <64644d07295fc7c2eb32fc89679ca23e6558b329.1695840821.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695843263884100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The fact that we need ci/helper script to run the workloads remains true, but the invocation has changed as of commit eb41e456 . We also extracted GitLab job specs into a standalone ci/jobs.sh script which allows execution of any container job we run in upstream CI locally, unlike the original functionality which only allowed builds, tests and shell (although important to say it could be adjusted with the right meson/ninja args). lcitool also became mandatory as it enables the container execution which replaced a Makefile we used to have for this purpose. Signed-off-by: Erik Skultety --- docs/testing.rst | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/docs/testing.rst b/docs/testing.rst index a597c3ed07..9ca47072ba 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -48,11 +48,17 @@ Running container builds with GitLab CI As long as your GitLab account has CI minutes available, pipelines will run automatically on every branch push to your fork. =20 -Running container builds locally -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Running container jobs locally +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -In order to run container builds locally, we have a ``helper`` script insi= de -the ``ci`` directory that can pull, build, and test (if applicable) change= s on +GitLab CI configuration file is the only source of truth when it comes to +various job specifications we execute as part of the upstream pipeline. +Luckily, all "script" (i.e. Bash scripts) were extracted to standalone She= ll +functions in ``ci/jobs.sh``. This allows users to run any of the container +GitLab job specifications locally by just referencing the job name. + +When it comes to actually running the GitLab jobs locally, we have a +``ci/helper`` script can pull, build, and test (if applicable) changes on your current local branch. It supports both the Docker and Podman runtimes with an automatic selection of whichever runtime is configured on your sys= tem. In case neither has been enabled/configured, please go through the followi= ng @@ -130,12 +136,27 @@ the default libvirt registry: fedora-rawhide-cross-mingw64 ... =20 -Now let's say one would want to build their local libvirt changes on Alpine -Edge using their own GitLab's registry container. They'd then proceed with +Now, let's say one would want to run the ``website`` job from GitLab on De= bian +11. This is how a GitLab job specification can be referenced on ``ci/helpe= r``'s +command line: =20 :: =20 - $ ci/helper build --image-prefix registry.gitlab.com//libvirt/ci= - alpine-edge + $ ci/helper run --job website debian-10 + +What if you want to run an rpmbuild of libvirt on an RPM distro? + +:: + + $ ci/helper run --job rpmbuild fedora-38 + +Want to use your own, say alpine-edge, container image from your GitLab +container registry? +Proceed with the following: + +:: + + $ ci/helper run --job build --image-prefix registry.gitlab.com//= libvirt/ci- alpine-edge =20 Finally, it would be nice if one could get an interactive shell inside the test environment to debug potential build issues. This can be achieved wit= h the @@ -143,7 +164,7 @@ following: =20 :: =20 - $ ci/helper shell alpine-edge + $ ci/helper run --job shell alpine-edge =20 =20 Integration tests --=20 2.41.0