简体   繁体   中英

Jenkins and PATH

I am using Jenkins and it runs a script that uses AWS command line tools. Because Jenkins doesn't use a shell like a normal user, it will fail saying "EC2_HOME" not set. Now I know how to set this for a regular user but not for Jenkins. Currently I have the EC2_HOME and keys exporting in my script that Jenkins uses but I don't feel comfortable having that info in my script.

How/where can I edit Jenkin's PATH to use the EC2 tools? I already edited /etc/profile. This was working until the server rebooted recently.

You should use Injecting Environment variable, so you can set up all env related variables and consisting across job

See more here at plugin doc: https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM