0

I'm trying to execute on command on Jenkins shell. Here is this command:

gits pull origin my-branch 

Jenkins say me that command is not found. ‘gits’ is a command that I build and group many repository. In my local machine, I add the variable environment to run fine 'gits' on bash like this :

export PATH=$PATH:/home/blabla/folder_contain_gist_file_script

It works fine when I try to 'gits' branch on my terminal machine. But on jenkins shell I got error. I think that the trouble comes from the variable environment on jenkins. So how to set jenkins environment variable?

Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38
DIEDHIOU
  • 138
  • 2
  • 5
  • Possible duplicate of [modify PATH variable in jenkins master](http://stackoverflow.com/questions/23502306/modify-path-variable-in-jenkins-master) – Dave Bacher Jan 04 '16 at 17:10

1 Answers1

5

In the manage jenkins/configure system menu, did you try to add that:

enter image description here

enter image description here

If it doesn't work, you can try the EnvInject plugin (to overwrite the PATH variable at the job level).

Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38