From nobody Tue Nov 18 22:46:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@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 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1613417301323164.33174852317882; Mon, 15 Feb 2021 11:28:21 -0800 (PST) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-U-rpnkP0OCuELalgQobcEA-1; Mon, 15 Feb 2021 14:28:18 -0500 Received: by mail-wm1-f70.google.com with SMTP id p8so8148313wmq.7 for ; Mon, 15 Feb 2021 11:28:18 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id b72sm407566wmd.4.2021.02.15.11.28.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 11:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613417300; 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=gEI3L3EmnEiaIH7fiI1VWypLhO2hZRfyOrIgMq8gEr4=; b=GeEtEabBXbPooP9SSpkSg+SN5lyRlNTqmw2dNb4iVx+Ss9dhZQc6kJAMvstgfvH3FPJo1U CiLolR0cJZ+Aih3dWvNU45l4/Gb/4u95SVUGCLee9FHe1AWniwCx5/4nk0v4RkRs27Gl6k rnePkZhA2+rc6I9J3180D06J1rQ5z4A= X-MC-Unique: U-rpnkP0OCuELalgQobcEA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gEI3L3EmnEiaIH7fiI1VWypLhO2hZRfyOrIgMq8gEr4=; b=E05lDB+ZfeC+WAe8RlzURc2Fy2bWUH7qsI3M4UPqrhHqh9MlfNGZM+KqKbtbHf/O7p S0OdWxDyXO914Ex4Cx6d41bzECuBfahP0xsZ/NC/0A92ONiry7/iBLa/SDt8yZiUxGRB yl2J6cDtGEBLtWt9AAfZx1OPbXpUdU7i47h/VJyveFzMAolOKspnKIHdbGd3qtz/mO6G KPPpT6siS32onnkD2Kg7h37YycjOgHEMVM/H39NqeXsMC+ftyuprmCxO2GZ707/XKuLq oz5Lzo+xbojWbPnAzXhq7FmiZ8O+8K61oLup/1ONrP4y1uanoiFOuSYkHqAryLbcxIcW AAVg== X-Gm-Message-State: AOAM530kctmQF8u/UoBGMU1Oy2fMswuQSIwosEvb4IIUSPGv62eA58Ib KM3xffGAykyEaL9IOO7C17U+EJ9ZBBNkmEUhn5FyuRTJ+/1g/6D0rdOQMqghH+vbVo0DQXi63Hp DugWQsj48BZTjWw== X-Received: by 2002:a1c:c90c:: with SMTP id f12mr343137wmb.98.1613417297263; Mon, 15 Feb 2021 11:28:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9FdQ4SpMAua4mvsr6kI7IjL6sWhCDG+VCoiwFCrb4W9/aHnEq6s/NgcNtGfIDuwOS7OsrMA== X-Received: by 2002:a1c:c90c:: with SMTP id f12mr343131wmb.98.1613417297146; Mon, 15 Feb 2021 11:28:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] gitlab-ci: Only push Docker 'latest' image when building default branch Date: Mon, 15 Feb 2021 20:28:14 +0100 Message-Id: <20210215192814.989441-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@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) While we are interested in building docker images in different branches, it only makes sense to push 'latest' to the registry when this is the project default branch (usually 'master'). Else when pushing different branches concurrently we might have inconsistent image state between branches. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 90fac85ce46..52a915f4141 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -17,7 +17,7 @@ -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker" -r $CI_REGISTRY_IMAGE - docker tag "qemu/$NAME" "$TAG" - - docker push "$TAG" + - test "$CI_COMMIT_BRANCH" =3D "$CI_DEFAULT_BRANCH" && docker push "$T= AG" after_script: - docker logout rules: --=20 2.26.2