[JIRA] [docker-workflow-plugin] (JENKINS-31225) docker.build fails with if HOME is not set.

2015-10-28 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick commented on  JENKINS-31225 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: docker.build fails with if HOME is not set.  
 
 
 
 
 
 
 
 
 
 
An echo message when starting a new node would be useful. The issue here is probably most easily resolved by updating the Workflow dependency to 1.9 (or newer), and checking for NODE_NAME, which is now unconditionally defined in the scope of any node block. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-31225) docker.build fails with if HOME is not set.

2015-10-28 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Jesse Glick updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-31225 
 
 
 
  docker.build fails with if HOME is not set.  
 
 
 
 
 
 
 
 
 

Change By:
 
 Jesse Glick 
 
 
 
 
 
 
 
 
 
 I had a node with docker installed - yet docker workflow was failing with{noformat}/scratch/jenkins/workspace/myjob/.954d8efa/script.sh: line 2: docker: command not found{noformat}yet docker was available on this node and in the path (as verified by {{sh 'which docker;docker version'}}It transpired that docker-workflow was spinning up another node unescearily and this node did not have docker installed - hence the failure.After some discussion with [~jglick] we found that the node with docker on did not set the {{HOME}} environment variable.The workaround was to wrap the docker commands with {{withEnv( \ ['HOME='+pwd()]) }}.The plugin should explicitly state why it is spawing a new node - to help the user understand, and should probably not rely on the {{HOME}} environment variable being set to determine if it can use {{docker}} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [docker-workflow-plugin] (JENKINS-31225) docker.build fails with if HOME is not set.

2015-10-28 Thread te...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 James Nord created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Jenkins /  JENKINS-31225 
 
 
 
  docker.build fails with if HOME is not set.  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 
 Jesse Glick 
 
 
 

Components:
 

 docker-workflow-plugin 
 
 
 

Created:
 

 28/Oct/15 12:35 PM 
 
 
 

Environment:
 

 CloudBees Docker Workflow 1.2  Workflow 1.10.1  Jenkins 1.609.1  arch linux 
 
 
 

Priority:
 
  Minor 
 
 
 

Reporter:
 
 James Nord 
 
 
 
 
 
 
 
 
 
 
I had a node with docker installed - yet docker workflow was failing with 

 
/scratch/jenkins/workspace/myjob/.954d8efa/script.sh: line 2: docker: command not found
 

 
yet docker was available on this node and in the path (as verified by sh 'which docker;docker version' 
It transpired that docker-workflow was spinning up another node unescearily and this node did not have docker installed - hence the failure. 
After some discussion with Jesse Glick we found that the node with docker on did not set the HOME environment variable. 
The workaround was to wrap the docker commands with {{withEnv(['HOME='+pwd()]) }}.