Configure (set) hudson slave environmentBy neokrates, written on April 26, 2010 |
howto |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Which Selenium configurations do you use to test your web front end?
- We use other tool (80%, 12 Votes)
- Selenium Grid (13%, 2 Votes)
- Selenium Grids under CI (like Hudson or TeamCity) (7%, 1 Votes)
- Single Selenium (0%, 0 Votes)
- Many Selenium grids on one Server (0%, 0 Votes)
- Other config (0%, 0 Votes)
Total Voters: 15
Loading ...
You have tried ~/.bashrc, ~/.profiles, /etc/environment, ~/.ssh/environment etc… but hudson slave fails to see your environment variables.
Fix is actually simple. Hudson doesn’t read slave environment each time you run the build.
You need to:
1 – set environment ;
2 – disconnect and reconnect hudson slave.
Software:
Hudson 1.355
Ubuntu Linux 9.x
Should also work for:
Other Hudson versions, most Unix systems
| 1 |
Set .bashrc and .profiles on slave
It might also work if you just add your variable to ~/.bashrc or ~/.profiles. In my case, I set THE SAME environment for both interactive shell and not interactive.
.profiles will use .bashrc.
Add to ~/.profiles:
source .bashrcAdd you environment variable to ~/.bashrc:
export MY_VARIABLE=MY_VALUE
IMPORTANT Here is a complete howto for SSH environment variables: Setting ssh remote host environment variables (Interactive shell)
| 2 |
Disconnect and reconnect Hudson slave
- Go to your node home : Hudson ? nodes ? my-great-node ;
- Select from the left menu disconnect;
- Then just click the button Launch slave agent
| 3 |
Test it
Simple check:
1 – create a free-style software project;
2 – add an Execute shell step
3 – command = env
4 – Tie this project to a node (your newly configured node)
5 – run and see that your environment variable is there
Have fun!
|
LEARN MORE (amazon bookstore)
|
|
TAGS
|
|
SOCIAL
|


















