[jenkins-ci PATCH 2/5] jobs: Include {global_env} everywhere

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

 



This environment will later include variables that are relevant to
more than make, so it should be included every time a shell command
is going to be executed.

Including {global_env} in the generic-*-job templates allows us to
drop the ad-hoc inclusions from the osinfo-db project.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 jobs/autotools.yaml        |  2 ++
 jobs/generic.yaml          | 16 ++++++++++++----
 jobs/go.yaml               |  2 ++
 jobs/perl-modulebuild.yaml |  3 +++
 jobs/python-distutils.yaml |  3 +++
 projects/osinfo-db.yaml    |  2 --
 6 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml
index a4a5a5b..8a37d00 100644
--- a/jobs/autotools.yaml
+++ b/jobs/autotools.yaml
@@ -218,6 +218,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           mkdir -p build32
           cd build32
 
@@ -228,6 +229,7 @@
           $MAKE -j{smp}
           $MAKE -j{smp} install
       - shell: |
+          {global_env}
           mkdir -p build64
           cd build64
 
diff --git a/jobs/generic.yaml b/jobs/generic.yaml
index 050e35d..20ef5da 100644
--- a/jobs/generic.yaml
+++ b/jobs/generic.yaml
@@ -39,7 +39,9 @@
           type: slave
           values: '{obj:machines}'
     builders:
-      - shell: '{command}'
+      - shell: |
+          {global_env}
+          {command}
     publishers:
       - email:
           recipients: '{obj:spam}'
@@ -74,7 +76,9 @@
           type: slave
           values: '{obj:machines}'
     builders:
-      - shell: '{command}'
+      - shell: |
+          {global_env}
+          {command}
     publishers:
       - email:
           recipients: '{obj:spam}'
@@ -109,7 +113,9 @@
           type: slave
           values: '{obj:machines}'
     builders:
-      - shell: '{command}'
+      - shell: |
+          {global_env}
+          {command}
     publishers:
       - email:
           recipients: '{obj:spam}'
@@ -145,7 +151,9 @@
           type: slave
           values: '{obj:machines}'
     builders:
-      - shell: '{command}'
+      - shell: |
+          {global_env}
+          {command}
     publishers:
       - email:
           recipients: '{obj:spam}'
diff --git a/jobs/go.yaml b/jobs/go.yaml
index 8eee6af..8764395 100644
--- a/jobs/go.yaml
+++ b/jobs/go.yaml
@@ -40,6 +40,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           go build -v
     publishers:
       - email:
@@ -76,6 +77,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           go test -tags api
     publishers:
       - email:
diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml
index cb81de1..188b153 100644
--- a/jobs/perl-modulebuild.yaml
+++ b/jobs/perl-modulebuild.yaml
@@ -40,6 +40,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           perl Build.PL install_base="$VIRT_PREFIX"
           perl Build
           perl Build manifest
@@ -80,6 +81,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           perl Build test
     publishers:
       - email:
@@ -117,6 +119,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           sed -i -e 's/BuildRequires: *perl-Sys-Virt.*//' *.spec
           sed -i -e 's/BuildRequires: *perl(Sys::Virt).*//' *.spec
           sed -i -e 's/BuildRequires: *libvirt.*devel.*//' *.spec
diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml
index 7055d26..b0e3f5f 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -40,6 +40,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           {command_pre_build}
           python2 setup.py build
           python2 setup.py install --prefix=$VIRT_PREFIX
@@ -79,6 +80,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           python2 setup.py test
     publishers:
       - email:
@@ -115,6 +117,7 @@
           values: '{obj:machines}'
     builders:
       - shell: |
+          {global_env}
           sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in
           python2 setup.py rpm
     publishers:
diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml
index 9d70000..95ad845 100644
--- a/projects/osinfo-db.yaml
+++ b/projects/osinfo-db.yaml
@@ -15,7 +15,6 @@
       - generic-build-job:
           parent_jobs: 'osinfo-db-tools-master-build'
           command: |
-            {global_env}
             export PATH=$VIRT_PREFIX/bin:$PATH
             $MAKE -j{smp} all
             $MAKE install OSINFO_DB_TARGET="--system"
@@ -27,7 +26,6 @@
             - libvirt-fedora-26
             - libvirt-fedora-rawhide
           command: |
-            {global_env}
             export PATH=$VIRT_PREFIX/bin:$PATH
             rm -f *.tar.xz
             $MAKE osinfo-db.spec
-- 
2.14.3

--
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