Different Jenkins PATH

0 votes

I’m using Jenkins from user Jenkins and has path $PATH set to something. But when I go to Jenkins web interface in system properties, I see a different $path.

I have installed Jenkins on Centos with the native rpm from Jenkins website. 

An someone explain why is this happening?

Aug 13, 2018 in Jenkins by Hannah
• 18,570 points
6,647 views

2 answers to this question.

0 votes
Changes you make to $path in bash wont be affected in shell, hence it will show a different $path.

Also, any changes you make to $PATH in your local shell (one that you personally ssh into) will not show up in Jenkins.

to change the path that Jenkins uses, you have two options (AFAIK):

1) Edit your /etc/profile file and add the paths that you want there

2) Go to the configuration page of your slave, and add environment variable PATH, with value: $PATH:/followed-by/paths/you/want/to/add
answered Aug 13, 2018 by Kalgi
• 52,360 points
0 votes

just add:

source /etc/profile

As the first step in my build process.

I assume you're running a shell command as part of your build. Put source /etc/profile as the first command in that Build > Execute Shell > Command textarea

answered Aug 13, 2018 by lina
• 8,220 points

Related Questions In Jenkins

0 votes
2 answers

How to start Jenkins on a different port rather than 8080?

This is simple, use the following command: java ...READ MORE

answered Jul 4, 2018 in Jenkins by Sophie may
• 10,610 points
35,081 views
0 votes
1 answer

How can I exchange jobs between 2 different Jenkins instances?

java -jar jenkins-cli.jar -s http://server get-job myjob ...READ MORE

answered Jul 6, 2018 in Jenkins by Sophie may
• 10,610 points
607 views
0 votes
1 answer

Different ways of scheduling a build in jenkins.

Here are the ways in which you ...READ MORE

answered Oct 11, 2019 in Jenkins by Sirajul
• 59,230 points
6,733 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,459 views
+2 votes
1 answer
+5 votes
5 answers

Jenkins properties file

Follow these steps: 1. Install ‘EnvInject’ plug-in in the Jenkins ...READ MORE

answered Aug 2, 2018 in Jenkins by lina
• 8,220 points
27,365 views
0 votes
2 answers

will running multiple Jenkins masters on same host increase the performance?

While using one big master, u can ...READ MORE

answered Aug 7, 2018 in Jenkins by Kalgi
• 52,360 points
3,013 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP