[libvirt] [jenkins-ci PATCH 4/5] jobs: Include {env} everywhere

Andrea Bolognani abologna at redhat.com
Fri Nov 17 18:26:11 UTC 2017


Any job might need to define a custom environment, so it should
be included everywhere to make it possible.

A side-effect of this change is that $OSINFO_SYSTEM_DIR will
be defined in libosinfo-master-rpm's environment, and the job
should stop failing.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 jobs/autotools.yaml        | 5 +++++
 jobs/generic.yaml          | 4 ++++
 jobs/go.yaml               | 2 ++
 jobs/perl-makemaker.yaml   | 3 +++
 jobs/perl-modulebuild.yaml | 3 +++
 jobs/python-distutils.yaml | 3 +++
 6 files changed, 20 insertions(+)

diff --git a/jobs/autotools.yaml b/jobs/autotools.yaml
index f6a2af0..d71d0ce 100644
--- a/jobs/autotools.yaml
+++ b/jobs/autotools.yaml
@@ -41,6 +41,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           mkdir build
           cd build
           ../autogen.sh --prefix=$VIRT_PREFIX {autogen_args}
@@ -82,6 +83,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           cd build
           $MAKE -j{smp} syntax-check
     publishers:
@@ -164,6 +166,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           cd build
           sed -i -e 's/BuildRequires: osinfo-db.*//' {name}.spec
           sed -i -e 's/BuildRequires: libvirt.*devel.*//' {name}.spec
@@ -219,6 +222,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           mkdir -p build32
           cd build32
 
@@ -230,6 +234,7 @@
           $MAKE -j{smp} install
       - shell: |
           {global_env}
+          {env}
           mkdir -p build64
           cd build64
 
diff --git a/jobs/generic.yaml b/jobs/generic.yaml
index 20ef5da..9b4569f 100644
--- a/jobs/generic.yaml
+++ b/jobs/generic.yaml
@@ -41,6 +41,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           {command}
     publishers:
       - email:
@@ -78,6 +79,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           {command}
     publishers:
       - email:
@@ -115,6 +117,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           {command}
     publishers:
       - email:
@@ -153,6 +156,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           {command}
     publishers:
       - email:
diff --git a/jobs/go.yaml b/jobs/go.yaml
index 8764395..22d3459 100644
--- a/jobs/go.yaml
+++ b/jobs/go.yaml
@@ -41,6 +41,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           go build -v
     publishers:
       - email:
@@ -78,6 +79,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           go test -tags api
     publishers:
       - email:
diff --git a/jobs/perl-makemaker.yaml b/jobs/perl-makemaker.yaml
index 930d4ee..ea05b61 100644
--- a/jobs/perl-makemaker.yaml
+++ b/jobs/perl-makemaker.yaml
@@ -42,6 +42,7 @@
       - shell: |
           perl Makefile.PL PREFIX="$VIRT_PREFIX"
           {global_env}
+          {env}
           $MAKE
           $MAKE -j{smp} install
           $MAKE -j{smp} manifest
@@ -83,6 +84,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           $MAKE -j{smp} test {test_args}
     publishers:
       - email:
@@ -121,6 +123,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           sed -i -e 's/BuildRequires: *perl-Sys-Virt.*//' *.spec
           sed -i -e 's/BuildRequires: *libvirt.*devel.*//' *.spec
           rm -f *.tar.{archive_format}
diff --git a/jobs/perl-modulebuild.yaml b/jobs/perl-modulebuild.yaml
index 188b153..e556237 100644
--- a/jobs/perl-modulebuild.yaml
+++ b/jobs/perl-modulebuild.yaml
@@ -41,6 +41,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           perl Build.PL install_base="$VIRT_PREFIX"
           perl Build
           perl Build manifest
@@ -82,6 +83,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           perl Build test
     publishers:
       - email:
@@ -120,6 +122,7 @@
     builders:
       - shell: |
           {global_env}
+          {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 b0e3f5f..fc969ad 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -41,6 +41,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           {command_pre_build}
           python2 setup.py build
           python2 setup.py install --prefix=$VIRT_PREFIX
@@ -81,6 +82,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           python2 setup.py test
     publishers:
       - email:
@@ -118,6 +120,7 @@
     builders:
       - shell: |
           {global_env}
+          {env}
           sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in
           python2 setup.py rpm
     publishers:
-- 
2.14.3




More information about the libvir-list mailing list