Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22372

envinject script content fails to run on slave unless another plugin in job provides buildWrapper in config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • envinject-plugin
    • None
    • Jenkins 1.556
      envinject 1.89
      tomcat 7.x

      Trivial EnvInject "script contents" throw java.io.IOException: Cannot run program "/bin/sh" (in directory "/home/slavehome/jenkins")

      It seems like the script is attempting to run on the master using the slaves jenkinsHome dir.

      The script contents run correctly if I add a build tool plugin that provides a tool to the environment.

      I've attached a job config that fails and its log, plus a working job and log where I added a build tool. The build tool installation apparently delays the "script content" execution until after the build tool install, which ensures the CWD is actually on the slave and not master when the "script content" is run.

        1. thisFAILS_log.txt
          3 kB
        2. thisFAILS.xml
          0.9 kB
        3. thisPASSES_log.txt
          0.6 kB
        4. thisPASSES.xml
          1 kB

            gbois Gregory Boissinot
            trbaker Trevor Baker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: