[M3devel] OpenCSW build farm access
Jay K
jay.krell at cornell.edu
Wed May 12 14:29:28 CEST 2010
Olaf, I have some leads:
1)
http://wiki.hudson-ci.org/display/HUDSON/Distributed+builds#Distributedbuilds-Example%3AConfigurationonUnix
# /var/hudson/bin/launch-slave is a shell script that Hudson uses to execute jobs remotely. This shell script sets up PATH and a few other things before launching slave.jar. Below is a very simple example script.
#!/bin/bash
JAVA_HOME=/opt/SUN/jdk1.6.0_04
PATH=$PATH:$JAVA_HOME/bin
export PATH
java -jar /var/hudson/bin/slave.jar
On master or slave or ??
2)
You can modify $PATH across all nodes:
http://www.modula3.com:8080/configure
Global Properties: Environment variables
This is yucky but appears easy and would work.
3)
You can specify CVS executable there.
Maybe ~/cvs or $HOME/cvs ??????
Which we'd setup appropriately.
4)
Hudson initialization script.
http://wiki.hudson-ci.org/display/HUDSON/Post-initialization+script
$HUDSON_HOME/init.groovy
I'm not sure this runs on slave or master.
I'd want to remove :/opt/csw/bin:, /opt/csw/bin:
from start, :/opt/csw/bin from end, and then insert /opt/csw/bin
somewhere, like start. That's too much Groovy for me to write,
and get working within Hudson..there is System.getenv, but
I don't see how to set the variables.
5)
You can set "tool locations".
I can't find elaboration on what that means.
Maybe
tool=cvs
location=/opt/csw/bin/cvs
?
6)
There is some mention of "PATH+".
I tried that. Didn't work.
7)
http://hudson.361315.n4.nabble.com/Slave-environment-and-Java-path-issues-td383751.html#a383752
Thanks. You correct that I didn't understand the difference when using a non-interactive shell.
In the end I solved the problem by putting together a simple launch-slave script which sets the environment I need:
#!/bin/bash
export JAVA_HOME=/usr/lib/java
...
8)
http://hudson.361315.n4.nabble.com/slave-s-PATH-change-not-picked-up-td1558100.html#a1559051
You were right. The ssh itself did not load the correct PATH (I
couldn't see it via putty). It turns out ssh does not read
/etc/profile, but it does read user's .bashrc. Go figure...
Maybe I'll fiddle with the Hudson keys or my old key and poke around more...
- Jay
More information about the M3devel
mailing list