From nobody Fri Apr 26 01:08:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1652345478; cv=none; d=zohomail.com; s=zohoarc; b=OKXhvwDFxQENpEoJjpz0P/V+L/IdwlOSNMPsbKj7newL6G4Hex07RB5Jsi7oXaBUQsSDE4G6xDUZkh106TV11+Lj4v+0LJstZ58EClev0IlPEDz8d3nADrgkmhlAF6K2lhbCHsFcFMgoYGBSI8lBeWiQh4BWGcOUOPoApIh3YSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652345478; 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=yP4/MZ0aYrtZKtcRjFd4R7Oqr3iHgyfFYYFdRUvXhjw=; b=C+YbXe1mz3MqBLP83xbjIxcHHJOUazS77ipnk1KE+lFLa691tr35HQHj8cpWiIit8MGoC8iHLfHN2qbuYG7y2ocImc+VNeRGbwi6ZUATrH3rja+nmSou9AFU/3zxfdJNseOGaBMHEtRk9OdfS68qMLm14Dw4E9kdZIe3yqs1eQE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 165234547820851.288831157446566; Thu, 12 May 2022 01:51:18 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-HJHaSqGEMCGjqp9SSuYwNw-1; Thu, 12 May 2022 04:51:14 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BAE4A90E980; Thu, 12 May 2022 08:51:11 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A65997C2A; Thu, 12 May 2022 08:51:11 +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 822431932210; Thu, 12 May 2022 08:51:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F3FF41932207 for ; Thu, 12 May 2022 08:51:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E566A112131E; Thu, 12 May 2022 08:51:10 +0000 (UTC) Received: from nautilus.redhat.com (unknown [10.40.193.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63CD31121319; Thu, 12 May 2022 08:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652345477; 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=yP4/MZ0aYrtZKtcRjFd4R7Oqr3iHgyfFYYFdRUvXhjw=; b=N3rsUtGYNJOdhiFPGgQI/8jI02+bajfC2dO3y3kpR2llrXYB7RYlPMbp2zhAxJNtVQUuFb zzDBSu5BvIiC+cP4NZhNRIy5sEld2j90Oz8TKNAjf3C/uxbAdhze26CRS7iptrdb841Z53 rf02xDPTZyJDIbRK3cTOzuUaBWtRjtI= X-MC-Unique: HJHaSqGEMCGjqp9SSuYwNw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/5] ci: Separate the integration job template to a separate file Date: Thu, 12 May 2022 10:50:55 +0200 Message-Id: <3577472cd13fd090f975ebe15bfb51a4a22bf4c6.1652345345.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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: eskultet@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652345479421100003 Future patches will do more code extraction from the existing template using YAML anchors so it'd be better that the templates would live separately from job definitions. Signed-off-by: Erik Skultety Reviewed-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/integration-template.yml | 52 +++++++++++++++++++++++++++++++++++ ci/integration.yml | 54 ++----------------------------------- 2 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 ci/integration-template.yml diff --git a/ci/integration-template.yml b/ci/integration-template.yml new file mode 100644 index 0000000000..c4201df6db --- /dev/null +++ b/ci/integration-template.yml @@ -0,0 +1,52 @@ +.integration_tests: + stage: integration_tests + before_script: + - mkdir "$SCRATCH_DIR" + - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.= conf" # Explicitly allow storing cores globally + - sudo systemctl daemon-reexec # need to reexec systemd after changing= config + - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* + - sudo pip3 install --prefix=3D/usr avocado-framework + - source /etc/os-release # in order to query the vendor-provided vari= ables + - if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 || + test "$ID" =3D "fedora" && test "$VERSION_ID" -lt 35; + then + DAEMONS=3D"libvirtd virtlogd virtlockd"; + else + DAEMONS=3D"virtproxyd virtqemud virtinterfaced virtsecretd virtsto= raged virtnwfilterd virtnodedevd virtlogd virtlockd"; + fi + - for daemon in $DAEMONS; + do + LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log"; + LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.d= bus 3:util.netlink 3:node_device 3:rpc 3:access 1:*"; + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "$L= OG_FILTERS" &>/dev/null; + sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "$L= OG_OUTPUTS" &>/dev/null; + sudo systemctl --quiet stop ${daemon}.service; + sudo systemctl restart ${daemon}.socket; + done + - sudo virsh net-start default &>/dev/null || true; + script: + - mkdir logs + - cd "$SCRATCH_DIR" + - git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git + - cd libvirt-tck + - sudo avocado --config avocado.config run --job-results-dir "$SCRATCH= _DIR"/avocado + after_script: + - test "$CI_JOB_STATUS" =3D "success" && exit 0; + - test -e "$SCRATCH_DIR"/avocado && sudo mv "$SCRATCH_DIR"/avocado/lat= est/test-results logs/avocado; + - sudo coredumpctl info --no-pager > logs/coredumpctl.txt + - sudo mv /var/log/libvirt logs/libvirt + - sudo chown -R $(whoami):$(whoami) logs + # rename all Avocado stderr/stdout logs to *.log so that GitLab's we= b UI doesn't mangle the MIME type + - find logs/avocado/ -type f ! -name "*.log" -exec + sh -c 'DIR=3D$(dirname {}); NAME=3D$(basename {}); mv $DIR/$NAME{,= .log}' \; + variables: + SCRATCH_DIR: "/tmp/scratch" + artifacts: + name: logs + paths: + - logs + when: on_failure + rules: + - if: '$LIBVIRT_CI_INTEGRATION' + when: on_success + - when: never diff --git a/ci/integration.yml b/ci/integration.yml index 17f20b3945..a71df41694 100644 --- a/ci/integration.yml +++ b/ci/integration.yml @@ -1,55 +1,5 @@ -.integration_tests: - stage: integration_tests - before_script: - - mkdir "$SCRATCH_DIR" - - sudo sh -c "echo DefaultLimitCORE=3Dinfinity >> /etc/systemd/system.= conf" # Explicitly allow storing cores globally - - sudo systemctl daemon-reexec # need to reexec systemd after changing= config - - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* - - sudo pip3 install --prefix=3D/usr avocado-framework - - source /etc/os-release # in order to query the vendor-provided vari= ables - - if test "$ID" =3D "centos" && test "$VERSION_ID" -lt 9 || - test "$ID" =3D "fedora" && test "$VERSION_ID" -lt 35; - then - DAEMONS=3D"libvirtd virtlogd virtlockd"; - else - DAEMONS=3D"virtproxyd virtqemud virtinterfaced virtsecretd virtsto= raged virtnwfilterd virtnodedevd virtlogd virtlockd"; - fi - - for daemon in $DAEMONS; - do - LOG_OUTPUTS=3D"1:file:/var/log/libvirt/${daemon}.log"; - LOG_FILTERS=3D"3:remote 4:event 3:util.json 3:util.object 3:util.d= bus 3:util.netlink 3:node_device 3:rpc 3:access 1:*"; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_filters "$L= OG_FILTERS" &>/dev/null; - sudo augtool set /files/etc/libvirt/${daemon}.conf/log_outputs "$L= OG_OUTPUTS" &>/dev/null; - sudo systemctl --quiet stop ${daemon}.service; - sudo systemctl restart ${daemon}.socket; - done - - sudo virsh net-start default &>/dev/null || true; - script: - - mkdir logs - - cd "$SCRATCH_DIR" - - git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git - - cd libvirt-tck - - sudo avocado --config avocado.config run --job-results-dir "$SCRATCH= _DIR"/avocado - after_script: - - test "$CI_JOB_STATUS" =3D "success" && exit 0; - - test -e "$SCRATCH_DIR"/avocado && sudo mv "$SCRATCH_DIR"/avocado/lat= est/test-results logs/avocado; - - sudo coredumpctl info --no-pager > logs/coredumpctl.txt - - sudo mv /var/log/libvirt logs/libvirt - - sudo chown -R $(whoami):$(whoami) logs - # rename all Avocado stderr/stdout logs to *.log so that GitLab's we= b UI doesn't mangle the MIME type - - find logs/avocado/ -type f ! -name "*.log" -exec - sh -c 'DIR=3D$(dirname {}); NAME=3D$(basename {}); mv $DIR/$NAME{,= .log}' \; - variables: - SCRATCH_DIR: "/tmp/scratch" - artifacts: - name: logs - paths: - - logs - when: on_failure - rules: - - if: '$LIBVIRT_CI_INTEGRATION' - when: on_success - - when: never +include: + - 'ci/integration-template.yml' =20 centos-stream-8-tests: extends: .integration_tests --=20 2.34.3