Jenkins中的环境变量 [英] Environment variables in Jenkins

查看:148
本文介绍了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路径等). 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->系统信息)中显示的环境变量是从系统继承的(即继承的环境变量)

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.

这些变量可以由外壳程序/系统设置,也可以由您在~/.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆