Jenkins not showing env set in from .bash_profile Jenkins not showing env set in from .bash_profile jenkins jenkins

Jenkins not showing env set in from .bash_profile


Bash sources .bash_profile only for login sessions, which a Jenkins process is not.

Put your PATH changes in .bashrc, instead.

See also the bash manual on startup files.


Whenever you add anything to your .bashrc or .bash_profile, you have to source it. So that added variables will be available to the environment. In your case, source ~/.bash_profile will do the trick.


The case could be because you launched the slave agent before making changes in Bash_profile. But Jenkins is still holding on to old values. Relaunching the slave agent could fix it as it has fixed the same issue in my case as the env was showing old parameters in profile file.