Jenkins 中的环境变量 [英] Environment variables in Jenkins
问题描述
Jenkins下的环境变量(管理jenkins->系统信息)从何而来?
Where do the environment variables under Jenkins ( manage jenkins -> system information ) come from?
我检查了/etc/init.d/tomcat5
、/usr/bin/dtomcat5
、/usr/bin/tomcat5
、/etc/sysconfig/tomcat5
和 /etc/profile
但在那里没有看到任何此类变量,特别是与 Oracle 相关的变量(Base
、>Home
、Ld_lib
、path
等).Tomcat 的 bashrc
有一些我注释掉的与 oracle 相关的变量,但我仍然在 jenkins 系统信息页面中看到相同的变量.有什么方向吗?
I checked /etc/init.d/tomcat5
, /usr/bin/dtomcat5
, /usr/bin/tomcat5
, /etc/sysconfig/tomcat5
and /etc/profile
but do not see any such variables there specially the ones related to Oracle (Base
, Home
, Ld_lib
, path
, etc.).
Tomcat's bashrc
has some oracle related variables which I commented out but I still see the same in the jenkins system info page. Any directions?
推荐答案
Jenkins中显示的环境变量(Manage Jenkins -> System information)是从系统继承的(即继承的环境变量)
The environment variables displayed in Jenkins (Manage Jenkins -> System information) are inherited from the system (i.e. inherited environment variables)
如果您在 shell 中运行 env
命令,您应该会看到与 Jenkins 显示的相同的环境变量.
If you run env
command in a shell you should see the same environment variables as Jenkins shows.
这些变量要么由shell/系统设置,要么由您在~/.bashrc
、~/.bash_profile
中设置.
These variables are either set by the shell/system or by you in ~/.bashrc
, ~/.bash_profile
.
还有环境变量由Jenkins设置 作业执行时,但这些未显示在系统信息中.
There are also environment variables set by Jenkins when a job executes, but these are not displayed in the System Information.
这篇关于Jenkins 中的环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!