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,040 points
2,204 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
• 51,850 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,200 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
• 53,110 points
7,217 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
• 9,940 points
100 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
• 53,110 points
521 views
+1 vote
2 answers

What possible return values are there in Jenkins plugin “Sonarqube scanner”

Use Webhooks in SonarQube Administration setup to ...READ MORE

answered Aug 3, 2018 in Jenkins by Nilesh
• 6,960 points
2,453 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
499 views
0 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,200 points
13,495 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
• 51,850 points
1,150 views