[libvirt] [jenkins-ci PATCH 06/10] guests: Move $PATH configuration to shell profile

Andrea Bolognani posted 10 patches 7 years, 1 month ago
[libvirt] [jenkins-ci PATCH 06/10] guests: Move $PATH configuration to shell profile
Posted by Andrea Bolognani 7 years, 1 month ago
Same as for $MAKE, moving the configuration here makes it
easier to reproduce issues outside of the CI environment.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 guests/group_vars/all/main.yml | 6 ++++--
 guests/templates/bashrc        | 2 ++
 jobs/defaults.yaml             | 1 -
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/guests/group_vars/all/main.yml b/guests/group_vars/all/main.yml
index dbe9517..ee53eec 100644
--- a/guests/group_vars/all/main.yml
+++ b/guests/group_vars/all/main.yml
@@ -8,8 +8,10 @@ ansible_ssh_pass: root
 
 jenkins_url: https://ci.centos.org/computer/{{ inventory_hostname }}/slave-agent.jnlp
 
-# Paths to various commands and files that might be OS-dependent. Can
-# be overridden on a per-host basis
+# Environment variables and paths to commands/files that might be
+# OS-dependent. Can be overridden on a per-host basis
+PATH: $VIRT_PREFIX/bin:$PATH
+
 bash: /bin/bash
 java: /usr/bin/java
 make: /usr/bin/make
diff --git a/guests/templates/bashrc b/guests/templates/bashrc
index 6bc0a56..affdf4c 100644
--- a/guests/templates/bashrc
+++ b/guests/templates/bashrc
@@ -1,4 +1,6 @@
 export PS1="[\u@\h \w]\$ "
 
+export PATH="{{ PATH }}"
+
 which gmake >/dev/null 2>&1 && export MAKE="gmake" || export MAKE="make"
 which ccache >/dev/null 2>&1 && export CC="ccache cc"
diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml
index 1eb77d9..23f8555 100644
--- a/jobs/defaults.yaml
+++ b/jobs/defaults.yaml
@@ -4,7 +4,6 @@
     branch: master
     node: libvirt
     global_env: |
-      export PATH=$VIRT_PREFIX/bin:$PATH
     local_env: |
     smp: 3
     spam: ymankad@redhat.com libvirt-ci@redhat.com
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 06/10] guests: Move $PATH configuration to shell profile
Posted by Pavel Hrdina 7 years, 1 month ago
On Thu, Apr 05, 2018 at 02:22:16PM +0200, Andrea Bolognani wrote:
> Same as for $MAKE, moving the configuration here makes it
> easier to reproduce issues outside of the CI environment.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  guests/group_vars/all/main.yml | 6 ++++--
>  guests/templates/bashrc        | 2 ++
>  jobs/defaults.yaml             | 1 -
>  3 files changed, 6 insertions(+), 3 deletions(-)

This should be probably moved after the following patch since it uses
VIRT_PREFIX.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH 06/10] guests: Move $PATH configuration to shell profile
Posted by Andrea Bolognani 7 years, 1 month ago
On Fri, 2018-04-06 at 17:03 +0200, Pavel Hrdina wrote:
> On Thu, Apr 05, 2018 at 02:22:16PM +0200, Andrea Bolognani wrote:
> > Same as for $MAKE, moving the configuration here makes it
> > easier to reproduce issues outside of the CI environment.
> > 
> > Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> > ---
> >  guests/group_vars/all/main.yml | 6 ++++--
> >  guests/templates/bashrc        | 2 ++
> >  jobs/defaults.yaml             | 1 -
> >  3 files changed, 6 insertions(+), 3 deletions(-)
> 
> This should be probably moved after the following patch since it uses
> VIRT_PREFIX.

Good point. I'll swap them.

-- 
Andrea Bolognani / Red Hat / Virtualization

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