[jenkins-ci PATCH] Use shallow git clones for projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
---
 guests/playbooks/build/jobs/prepare.yml | 1 +
 jenkins/jobs/autotools.yaml             | 1 +
 jenkins/jobs/generic.yaml               | 1 +
 jenkins/jobs/go.yaml                    | 1 +
 jenkins/jobs/perl-modulebuild.yaml      | 1 +
 jenkins/jobs/python-distutils.yaml      | 1 +
 6 files changed, 6 insertions(+)

diff --git a/guests/playbooks/build/jobs/prepare.yml b/guests/playbooks/build/jobs/prepare.yml
index 576afbc..35ca9e4 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: 1
   when:
     - inventory_hostname in machines
 
diff --git a/jenkins/jobs/autotools.yaml b/jenkins/jobs/autotools.yaml
index f04ec17..1a85781 100644
--- a/jenkins/jobs/autotools.yaml
+++ b/jenkins/jobs/autotools.yaml
@@ -27,6 +27,7 @@
             after: true
           skip-tag: true
           wipe-workspace: false
+          shallow-clone: true
     triggers:
       - reverse:
           jobs: '{obj:parent_jobs}'
diff --git a/jenkins/jobs/generic.yaml b/jenkins/jobs/generic.yaml
index ca69513..f58945e 100644
--- a/jenkins/jobs/generic.yaml
+++ b/jenkins/jobs/generic.yaml
@@ -27,6 +27,7 @@
             after: true
           skip-tag: true
           wipe-workspace: false
+          shallow-clone: true
     triggers:
       - reverse:
           jobs: '{obj:parent_jobs}'
diff --git a/jenkins/jobs/go.yaml b/jenkins/jobs/go.yaml
index 1bdcb5f..dd3c5d4 100644
--- a/jenkins/jobs/go.yaml
+++ b/jenkins/jobs/go.yaml
@@ -27,6 +27,7 @@
             after: true
           skip-tag: true
           wipe-workspace: false
+          shallow-clone: true
     triggers:
       - reverse:
           jobs: '{obj:parent_jobs}'
diff --git a/jenkins/jobs/perl-modulebuild.yaml b/jenkins/jobs/perl-modulebuild.yaml
index 7173493..0ea271e 100644
--- a/jenkins/jobs/perl-modulebuild.yaml
+++ b/jenkins/jobs/perl-modulebuild.yaml
@@ -27,6 +27,7 @@
             after: true
           skip-tag: true
           wipe-workspace: false
+          shallow-clone: true
     triggers:
       - reverse:
           jobs: '{obj:parent_jobs}'
diff --git a/jenkins/jobs/python-distutils.yaml b/jenkins/jobs/python-distutils.yaml
index f56794c..a3eb076 100644
--- a/jenkins/jobs/python-distutils.yaml
+++ b/jenkins/jobs/python-distutils.yaml
@@ -27,6 +27,7 @@
             after: true
           skip-tag: true
           wipe-workspace: false
+          shallow-clone: true
     triggers:
       - reverse:
           jobs: '{obj:parent_jobs}'
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux