From patchwork Thu May 26 11:07:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 12862384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15238C433F5 for ; Thu, 26 May 2022 11:56:25 +0000 (UTC) Received: from localhost ([::1]:57700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuC6K-0000mr-0w for qemu-devel@archiver.kernel.org; Thu, 26 May 2022 07:56:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuBKi-0007op-Qh for qemu-devel@nongnu.org; Thu, 26 May 2022 07:07:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:28701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuBKg-0003LX-Vp for qemu-devel@nongnu.org; Thu, 26 May 2022 07:07:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653563230; h=from:from: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; bh=GTEXt67HrlP5FoMRAfoK2qvwsuOoXy4l8O61XksrrDk=; b=Op19yERhmqsIkqn3EJGUxMw9y7TC+OSy5GWfGhl7CobqJ3HVe/XCPuQrVOS/fm+ZLTJNCP MC6+I2WYpfuQ3CLWqfsc34DI+97D7NPudLcBSBlK0xvKXtrA6uR/XgbkKMZu9gkd9K6Mmc C3q3RL1UV6x2FjVsN0NmSdg6IJvODnQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.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-447-4qY5cm05NF6KaGHaPqXVjQ-1; Thu, 26 May 2022 07:07:06 -0400 X-MC-Unique: 4qY5cm05NF6KaGHaPqXVjQ-1 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 8AC421C068CF; Thu, 26 May 2022 11:07:06 +0000 (UTC) Received: from virtlab420.virt.lab.eng.bos.redhat.com (virtlab420.virt.lab.eng.bos.redhat.com [10.19.152.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50A631731B; Thu, 26 May 2022 11:07:06 +0000 (UTC) From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PATCH 0/5] gitlab: restrict running jobs in forks and upstream master Date: Thu, 26 May 2022 07:07:00 -0400 Message-Id: <20220526110705.59952-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Currently on upstream most jobs will run in both staging and master. This is quite wasteful of CI credits. The only need to run in master is for the jobs related to publishing the website In forks we run jobs on every push. With restricted CI allowance this is quickly going to cause problems. With this series jobs will no longer run on forks at all, without an opt-in with QEMU_CI=1 (pipeline with manual jobs) or QEMU_CI=2 (pipeline with immediate jobs) This is a rewrite of a previous proposal: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg02104.html where I've kept it simpler and also split up the patches into more understandable chunks Daniel P. Berrangé (5): gitlab: introduce a common base job template gitlab: convert Cirrus jobs to .base_job_template gitlab: convert static checks to .base_job_template gitlab: convert build/container jobs to .base_job_template gitlab: don't run CI jobs in forks by default .gitlab-ci.d/base.yml | 72 +++++++++++++++++++++++ .gitlab-ci.d/buildtest-template.yml | 16 ++--- .gitlab-ci.d/buildtest.yml | 28 ++++----- .gitlab-ci.d/cirrus.yml | 16 ++--- .gitlab-ci.d/container-cross.yml | 6 +- .gitlab-ci.d/container-template.yml | 1 + .gitlab-ci.d/crossbuild-template.yml | 3 + .gitlab-ci.d/qemu-project.yml | 1 + .gitlab-ci.d/static_checks.yml | 19 +++--- .gitlab-ci.d/windows.yml | 1 + docs/devel/ci-jobs.rst.inc | 88 +++++++++++++++++++++++++++- 11 files changed, 199 insertions(+), 52 deletions(-) create mode 100644 .gitlab-ci.d/base.yml