From nobody Mon Apr 29 15:43:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1566917029; cv=none; d=zoho.com; s=zohoarc; b=D+27kYDEaGNA3PFvQUcnRpcfLp2csLcGDkqs1Tplf01LMQgZI3HwcoWyGYSWIT76+W4Ic3mvsEY7803t6XgfPIq5jh+TaKzk3BOTqwt9fIKU6SgysNO2GOtqEXrgYA0E/L3n7XH4qDqI9anlDaJv/Mcy9Esa68J17KLJTyx8DfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566917029; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=/pLIEYFbfqrzpKmUpZUszTaoBYPCm5MBt2pHybmVGIs=; b=QhNmiY11iIN/akO7/Gz3YIKoc59EtrRFwzg0F1XsmKaUIUOYONCuVNPuHUIGAjZFzBQdrnh8V1915bzRSZM43rZnJAmHK5ZF1J8LVAnl/tBTlPmlHSac8+J6ipzqH8sQAQlx9S9QraYGyGfuy/aP7bZFUXFXv8woxa+RoJL35+o= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566917029582613.0886279454887; Tue, 27 Aug 2019 07:43:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92C8164120; Tue, 27 Aug 2019 14:43:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E18A96402F; Tue, 27 Aug 2019 14:43:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 698251806B01; Tue, 27 Aug 2019 14:43:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7REhics025725 for ; Tue, 27 Aug 2019 10:43:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id D365960C05; Tue, 27 Aug 2019 14:43:44 +0000 (UTC) Received: from ridgehead.brq.redhat.com (unknown [10.43.2.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33B926E720; Tue, 27 Aug 2019 14:43:27 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 27 Aug 2019 16:43:26 +0200 Message-Id: <0727de70331cd1cb13fa6c81b50cb253c0add701.1566916981.git.eskultet@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [jenkins-ci PATCH v2] guests: Introduce a var to enable shallow git clones for projects X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 27 Aug 2019 14:43:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" First of all, we don't need the full history for builds and we can save some time during the prepare phase. The disk footprint is about 5x smaller, but the most important thing is the repo clone duration difference e.g. in libvirt's case is quite significant: full history: real 3m45.236s user 1m53.074s sys 0m15.577s depth 1: real 0m14.868s user 0m2.215s sys 0m0.906s Since jenkins has a local copy and doesn't clone from the internet, this patch modifies only the configs for local VMs. --- guests/group_vars/all/main.yml | 2 ++ guests/playbooks/build/jobs/prepare.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/guests/group_vars/all/main.yml b/guests/group_vars/all/main.yml index b73795e..6efcb52 100644 --- a/guests/group_vars/all/main.yml +++ b/guests/group_vars/all/main.yml @@ -5,3 +5,5 @@ ansible_ssh_pass: root =20 jenkins_url: https://ci.centos.org/computer/{{ inventory_hostname }}/slave= -agent.jnlp + +git_shallow_clone: true diff --git a/guests/playbooks/build/jobs/prepare.yml b/guests/playbooks/bui= ld/jobs/prepare.yml index 576afbc..477c169 100644 --- a/guests/playbooks/build/jobs/prepare.yml +++ b/guests/playbooks/build/jobs/prepare.yml @@ -5,6 +5,7 @@ version: '{{ git_branch }}' dest: '{{ name }}' force: yes + depth: '{{ git_shallow_clone | ternary(1, omit) }}' when: - inventory_hostname in machines =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list