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

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,370 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?

In case you want to change the ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 59,090 points
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,550 points
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,090 points
+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
+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
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,370 points