Skip to content

Set environment

To get arround issue #4 (closed) I removed the native git 1.7.1 and compiled+installed git 2.4.0. git went to /usr/local/bin by default, as it should.

This runner replaces the environment during builds, which means bash doesn't load any of the profile files (like /etc/profile and ~/.bashrc) and the path defaults to "/sbin:/usr/sbin:/bin:/usr/bin".

To overcome this I had to create the symbolic link /bin/git and add extra build commands that setup the environment.

I believe we should be able to set the environment in the runner options. (like PATH, JAVA_HOME, M2_HOME, ANT_HOME, CLASSPATH, GIT_SSH, GIT_ASKPASS, GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL)

A more flexible approach would be custom shell commands in the runner options to setup the environment. (ex: "source /etc/profile", "export ANT_HOME=/opt/apache-ant-1.9.4")