Re: [jenkins-ci PATCH 4/5] jobs: Define $OSINFO_SYSTEM_DIR in default make_env

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

 



On Fri, Oct 27, 2017 at 09:48:14AM +0200, Andrea Bolognani wrote:
> Althought the environment variable is only used when building
> libosinfo, there is no harm in having it set in the environment
> at all times; moreover, hoisting it to the default make_env
> allows us to remove duplicated code used to set $MAKE in the
> libosinfo project.
> 
> $OSINFO_SYSTEM_DIR itself depends on $VIRT_PREFIX, which along
> with a bunch of other environment variables is defined not at
> the job level but rather at the machine level, making it opaque
> to anyone except the Jenkins administrator: the plan is to move
> even more environment variables to the default make_env over
> time.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  jobs/defaults.yaml      | 1 +
>  projects/libosinfo.yaml | 7 -------
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
> index a403d0e..7aa5a30 100644
> --- a/jobs/defaults.yaml
> +++ b/jobs/defaults.yaml
> @@ -9,6 +9,7 @@
>        if [ "$unamestr" = 'FreeBSD' ]; then
>            MAKE='gmake'
>        fi
> +      export OSINFO_SYSTEM_DIR=$VIRT_PREFIX/share/osinfo
>      check_env: |
>        export VIR_TEST_EXPENSIVE=1
>        export VIR_TEST_DEBUG=2
> diff --git a/projects/libosinfo.yaml b/projects/libosinfo.yaml
> index 77c0414..7fa5b48 100644
> --- a/projects/libosinfo.yaml
> +++ b/projects/libosinfo.yaml
> @@ -7,13 +7,6 @@
>        - libvirt-fedora-26
>        - libvirt-fedora-rawhide
>      title: libosinfo
> -    make_env: |
> -      MAKE='make'
> -      unamestr=`uname`
> -      if [ "$unamestr" = 'FreeBSD' ]; then
> -          MAKE='gmake'
> -      fi
> -      export OSINFO_SYSTEM_DIR=$VIRT_PREFIX/share/osinfo
>      jobs:
>        - autotools-build-job:
>            parent_jobs: 'osinfo-db-master-build'

Again, I don't really think this change is a benefit. Project specific env
vars should only be defined against the project rules.

If we want to eliminate the duplication, of the make variables, we should
change the variables we set. ie, stop overriding 'make_env' here, and instead
provide a general 'build_env' property that projects can set, that gets subs
into the autotools.yaml file.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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