From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F688C4338F for ; Sat, 24 Jul 2021 08:59:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 59419600EF for ; Sat, 24 Jul 2021 08:59:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 59419600EF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7DVH-0002ya-FN for qemu-devel@archiver.kernel.org; Sat, 24 Jul 2021 04:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7DR3-00034J-4U for qemu-devel@nongnu.org; Sat, 24 Jul 2021 04:55:05 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:41663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7DQz-0002wv-SP for qemu-devel@nongnu.org; Sat, 24 Jul 2021 04:55:03 -0400 Received: by mail-ed1-x530.google.com with SMTP id h10so4672917edv.8 for ; Sat, 24 Jul 2021 01:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GunVyRx6o/LzyjiMTpXKLJjGGHesCVbnI05qmeGk7yE=; b=ZqqtHDDrhMf8Musblx1RDL7qgTSkVtVEapKW42Ey896oOY+yC/wOQbkJxOIfVLKTOC R+C9EmJ+ZZ+ALpzSm6f7yVp9d5yNkCo6pUlN9Pe1Jgc6JV65oGK+srU2G63Wu6JydzO6 Bx8l6ygNq637gHxpGGs6yuraDfegbcxkt58ylERkb45maR/hJVOQ2DpwRyHf0mF2K9Ti Jbc9BUljpXm3Xqtxh3bam/bQV/q+0NTNTEDeWwpUUDiQbXKGV4u3Lvg1yXUungXbwkcS Y3yI+JA5sIzZFnyxWJcSxsnXD69fJjL7Dec0gGmtlyQT3yo6F1tSEHN3/f3iU3t4Urm4 +1sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GunVyRx6o/LzyjiMTpXKLJjGGHesCVbnI05qmeGk7yE=; b=bVkMrwPUcnMOzxGd/ZyyXg+pied3hTrwD4Cgg9yzTsQEwieqfysgca3wzjA7/anLCj SZGKxYToPs1V73a6jztn02P2nhzFWqicKZ5De8FBb8CesaGRR69J/S48STWs4xj4fz75 ET+3JUjNT2iYhH4tpFDAT5PXCdgI9IMsKGYJwsKbMaLWPzEsxFKSm1gFo8PTO1H4vOFs 61CQf2oi02QpPzsLw0v071pJCjnKnnmc/QHzLdA/4qdpG/d2F8OczE7VR/h1vG+fwcXL Siqt7bMsfmEDf2RtyStzPTM+JKH55HcY6zwQy0u287HpZq2Izbh8cVDQ3Dn9PmDhXiTg jB+A== X-Gm-Message-State: AOAM531gedx4soPW3cRXAv+3TR3Ml520SNZq9Xe94AbxpNyxAHgW9KJL ke5y3JCy9R2rDvJnuR0cE5JwOq+GEfl86w== X-Google-Smtp-Source: ABdhPJxwb9Er3NuCpmBjBba5wDZ/Nqvvg6gVbeJsYm+aPoR8deJOKSocBV6Iyvzf92ItWA7pSzdB9Q== X-Received: by 2002:aa7:d543:: with SMTP id u3mr10240780edr.37.1627116900647; Sat, 24 Jul 2021 01:55:00 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id j21sm15723881edq.76.2021.07.24.01.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 01:55:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 7/9] gitlab: only let pages be published from default branch Date: Sat, 24 Jul 2021 10:54:51 +0200 Message-Id: <20210724085453.16791-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210724085453.16791-1-pbonzini@redhat.com> References: <20210724085453.16791-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé GitLab will happily publish pages generated by the latest CI pipeline from any branch: https://docs.gitlab.com/ee/user/project/pages/introduction.html "Remember that GitLab Pages are by default branch/tag agnostic and their deployment relies solely on what you specify in .gitlab-ci.yml. You can limit the pages job with the only parameter, whenever a new commit is pushed to a branch used specifically for your pages." The current "pages" job is not limited, so it is happily publishing docs content from any branch/tag in qemu.git that gets pushed to. This means we're potentially publishing from the "staging" branch or worse from outdated "stable-NNN" branches This change restricts it to only publish from the default branch in the main repository. For contributor forks, however, we allow it to publish from any branch, since users will have arbitrarily named topic branches in flight at any time. Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210723113051.2792799-1-berrange@redhat.com> Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 89df51517c..80b57b7082 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -663,6 +663,17 @@ build-tools-and-docs-debian: # Prepare for GitLab pages deployment. Anything copied into the # "public" directory will be deployed to $USER.gitlab.io/$PROJECT +# +# GitLab publishes from any branch that triggers a CI pipeline +# +# For the main repo we don't want to publish from 'staging' +# since that content may not be pushed, nor do we wish to +# publish from 'stable-NNN' branches as that content is outdated. +# Thus we restrict to just the default branch +# +# For contributor forks we want to publish from any repo so +# that users can see the results of their commits, regardless +# of what topic branch they're currently using pages: image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest stage: test @@ -681,3 +692,10 @@ pages: artifacts: paths: - public + rules: + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: on_success + - if: '$CI_PROJECT_NAMESPACE == "qemu-project"' + when: never + - if: '$CI_PROJECT_NAMESPACE != "qemu-project"' + when: on_success -- 2.31.1