From patchwork Fri May 27 15:36:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 576496 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp766555mab; Fri, 27 May 2022 09:05:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnNXxvXEnpOwppxpTNzdcMhgtngYH7wp7uvn5lABvOeGnJdwQ9ZZt9rhqKr/RKc40S1L+o X-Received: by 2002:ac8:5c51:0:b0:2f3:bc1a:4922 with SMTP id j17-20020ac85c51000000b002f3bc1a4922mr33280840qtj.560.1653667504574; Fri, 27 May 2022 09:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653667504; cv=none; d=google.com; s=arc-20160816; b=SEC7nqa4JNl5CJICCjca73mxwZEIm3O8o7QcC2Moul1rAfETxDDY9ZCA25hlty4jY1 icozofIAD3YaOtFERCgB9VPC9puLgXMCcxKAzERK+oVipy4NffZHD/0ZQxWs4QnwyLfb Mc5CYIrqAR2qofrGAnQZVPvRHyb4Ik6bEI+ioveqa1IxJSdpbxpYp8ZDKeIMQg2Mfd+R 4QrF8//u4YXue3KHc1GMWd00gzpEl2Mut5z3n+IZ3c8AerxuMdI5970BaVO9YmdBi9N7 FPHrEA/NQ+lKQdEy6aZcT4V48V0QZm/HD0UUITfAXQUg//++1EhzSWQ7pbAfVFKQiCmf m49w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HdiUEMjMYGrvyNsENub2j4h95C65fH2HJ/5Oupo3Ekk=; b=VrBRpJT5nqg76/pxp1T2IlFpn4pxWgPgsYiOuhUk6rS7BsqtUI3FoCnJoa5SY5JM+L OeXnfX6APxXo426917VCaPPROt7ZKr5Wrh2FBYpIoKBYSheocTQkLY5HJ3Uu2opdR1XA GYWrE0edS+N7b9053MXC1xzbOl4aCYT4YQWyMeSfAYGqGKNjR2aFmI8ExY3mCFpXFLoC huzKchpkstosjedoQnvrGexEKR6pWLcfvpC4hPXdNKjYs1NH6uWlHrAhC5TYvUBIWwCf hA0nX7tWvWbnmUgwhOoOohEr54Ojpo+I/I3nMA/0pMJgag5XDl7h0bpAJ3CFLAMKn/L9 TeAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ugrhx82W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n4-20020ac85b44000000b002f9359199c8si3371149qtw.195.2022.05.27.09.05.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 09:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ugrhx82W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nucSW-0002UQ-1P for patch@linaro.org; Fri, 27 May 2022 12:05:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuc8d-0003eu-4N for qemu-devel@nongnu.org; Fri, 27 May 2022 11:44:31 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuc8W-0003rz-PL for qemu-devel@nongnu.org; Fri, 27 May 2022 11:44:30 -0400 Received: by mail-wr1-x42c.google.com with SMTP id l30so6359511wrb.8 for ; Fri, 27 May 2022 08:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HdiUEMjMYGrvyNsENub2j4h95C65fH2HJ/5Oupo3Ekk=; b=ugrhx82Wa3PTIi++EvH0WSXXPTeeWFVNXFqMkC6isl/tiimrC4abHwoisP2SEfCQYk zrCN6c2n4DSJqnFqHDdXuxhRheUhI0Ssm6IYI48wHuz42j2cxjJm1bE4c6ltmsiDJz+P mEKrOmc5Zqk4rWcAgW+xqCDZarrdHV859PUFPfr8qHgRK0BCsdpQOrVQvc/sTBcRTCmy Pvc2U9s6Vbrbo7DNQ/bAcTwrF8ykLLdkqKJCHBtlz2KpzsLigLaiAIFEMvJTZ6qdkwKE SzI2UaNrr86CIFrwdFDaNzrZbgItlGza/FysA0Caa2MobMN4OB1jQhNadFLCXZve+BB2 fJsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HdiUEMjMYGrvyNsENub2j4h95C65fH2HJ/5Oupo3Ekk=; b=thJ6oKCEXcsEGvhB0OqrOntkOEhAjqOFaaLe9S3xY6yCeB0m9uzpZHnT+b5DfNgTWN UX/zi1c5rjRqpyYkvM59W18W2uBNR4HKXtkRym1SFanh9KpkmW/HiX4J8OUerxmReM0L 8kTsouAVC+mh37qeQAQyTcElNX1xASJTQF241POHM5MsNL7QhP1toYYSNu/U6MD3Xelr NncbKUlqLV2HxU8EZiAXtqul0+hPQX5JWAEy3a18BA/LELf5tYijWdUBGUveShFVf5xd dBgru3OSGoP/eh8Tv5UzB+1hxhk4EU3KoLSbrJxwboiscBk8dEgvYBCyYtHco8wI3DKU KuDQ== X-Gm-Message-State: AOAM530c+YYkL/osTKyUbsw5UlqwBmEMD47/eEhrmowSwJT2kSty+8TP 9RxGxFtMEOQEMN6G/Ulm8vay/Q== X-Received: by 2002:a05:6000:1210:b0:210:414:ec4 with SMTP id e16-20020a056000121000b0021004140ec4mr9505000wrx.250.1653666264065; Fri, 27 May 2022 08:44:24 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g10-20020a5d46ca000000b0020ff9802ee3sm2064680wrs.35.2022.05.27.08.44.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 08:44:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7DED71FFD5; Fri, 27 May 2022 16:36:06 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 30/33] gitlab: convert static checks to .base_job_template Date: Fri, 27 May 2022 16:36:00 +0100 Message-Id: <20220527153603.887929-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220527153603.887929-1-alex.bennee@linaro.org> References: <20220527153603.887929-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé This folds the static checks into using the base job template rules, introducing one new variable - QEMU_JOB_ONLY_FORKS - a job that should never run on an upstream pipeline. The information it reports is only applicable to contributors in a pre-submission scenario, not time of merge. Signed-off-by: Daniel P. Berrangé Message-Id: <20220526110705.59952-4-berrange@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- docs/devel/ci-jobs.rst.inc | 7 +++++++ .gitlab-ci.d/base.yml | 4 ++++ .gitlab-ci.d/static_checks.yml | 19 +++++++------------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index a539f502da..4c7e30ab08 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -66,6 +66,13 @@ by default due to need to conserve limited CI resources. It is available to be started manually by the contributor in the CI pipelines UI. +QEMU_JOB_ONLY_FORKS +~~~~~~~~~~~~~~~~~~~ + +The job results are only of interest to contributors prior to +submitting code. They are not required as part of the gating +CI pipeline. + Contributor controlled runtime variables ---------------------------------------- diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index 5734caf9fe..9a0b8d7f97 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -16,6 +16,10 @@ - if: '$QEMU_JOB_CIRRUS && ($CIRRUS_GITHUB_REPO == "" || $CIRRUS_API_TOKEN == "")' when: never + # Jobs only intended for forks should always be skipped on upstram + - if: '$QEMU_JOB_ONLY_FORKS == "1" && $CI_PROJECT_NAMESPACE == "qemu-project"' + when: never + ############################################################# # Stage 2: fine tune execution of jobs in specific scenarios diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml index 94858e3272..289ad1359e 100644 --- a/.gitlab-ci.d/static_checks.yml +++ b/.gitlab-ci.d/static_checks.yml @@ -1,4 +1,5 @@ check-patch: + extends: .base_job_template stage: build image: python:3.10-alpine needs: [] @@ -6,15 +7,13 @@ check-patch: - .gitlab-ci.d/check-patch.py variables: GIT_DEPTH: 1000 + QEMU_JOB_ONLY_FORKS: 1 before_script: - apk -U add git perl - rules: - - if: '$CI_PROJECT_NAMESPACE == "qemu-project"' - when: never - - when: on_success - allow_failure: true + allow_failure: true check-dco: + extends: .base_job_template stage: build image: python:3.10-alpine needs: [] @@ -23,12 +22,9 @@ check-dco: GIT_DEPTH: 1000 before_script: - apk -U add git - rules: - - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - when: never - - when: on_success check-python-pipenv: + extends: .base_job_template stage: test image: $CI_REGISTRY_IMAGE/qemu/python:latest script: @@ -39,6 +35,7 @@ check-python-pipenv: job: python-container check-python-tox: + extends: .base_job_template stage: test image: $CI_REGISTRY_IMAGE/qemu/python:latest script: @@ -46,8 +43,6 @@ check-python-tox: variables: GIT_DEPTH: 1 QEMU_TOX_EXTRA_ARGS: --skip-missing-interpreters=false + QEMU_JOB_OPTIONAL: 1 needs: job: python-container - rules: - - when: manual - allow_failure: true