Change By: Mike Dougherty (03/May/13 2:08 AM)
Description: 'Tool Home' does not appear to process environment variables or {{ \ ~}} ({{$HOME}}). I'd like to be specifying Tool Home to be {{~/.rvm}} but it doesn't appear to be possible - instead it expands to: {{/Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ruby-1.9.3/~/.rvm}}

More details: I'm trying to set up a tool which will install rvm, ruby, and bundler. My slave hosts are a mix of Linux (centos) and Mac OS X. RVM's default behavior (and one that I'm relying on) is to install to {{${HOME}/.rvm}}. Of course, on Linux this is {{/home/jenkins}} and on Mac this is {{/Users/jenkins}}. 

Install script: 
{
{ code}
if ! which rvm > /dev/null; then
    echo "Installing RVM"
    curl -kL https://get.rvm.io | bash -s stable --ruby
fi

if type -t rvm | head -n1 | grep -v 'function' > /dev/null; then
    JENKINS_RVM_PATH="$HOME/.rvm/scripts/rvm"
    source "$JENKINS_RVM_PATH"
fi

if ! ruby --version | grep 1.9.3p362 > /dev/null ; then
    if ! rvm use 1.9.3-p362 > /dev/null; then
        echo "Installing ruby 1.9.3"
        rvm install 1.9.3-p362
    fi
    rvm use 1.9.3-p362
fi

if ! which bundle > /dev/null; then
    echo "Installing bundler"
    gem install bundler
fi
{code } }

Build log: 
{
{ code}
Started by user mdougherty
[ruby-1.9.3] $ sh -e /Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ruby-1.9.3/hudson7360731141557268923.sh
ruby-1.9.3 is installed at /Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ruby-1.9.3/~/.rvm
FATAL: /Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ruby-1.9.3/~/.rvm does not exist.
/Users/jenkins/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/ruby-1.9.3/~/.rvm does not exist.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:460)
at com.cloudbees.jenkins.plugins.customtools.CustomTool$1.invoke(CustomTool.java:136)
at com.cloudbees.jenkins.plugins.customtools.CustomTool$1.invoke(CustomTool.java:131)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
{code } }


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to