Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13750

Command task failing in Bamboo 5.1 if executable path is a shell command

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Low
    • None
    • None
    • Tasks

    Description

      Steps to reproduce

      1. Create a command task with the path pointing to a shell command say echo for example. See the attached screenshot
      2. When this is run against an older version of Bamboo, it runs fine despite the error message that "Unable to find executable at echo"
        error	03-Sep-2013 16:58:50	Unable to find executable at echo
        command	03-Sep-2013 16:58:50	Beginning to execute external process for build 'TESTA - TSTA - Default Job'\n ... running command line: \necho 2 > sultan.txt\n ... in: D:\atlassian\BAMBOO\atlassian-bamboo-4.4.4\HOME\xml-data\build-dir\TESTA-TSTA-JOB1\n
        
      3. Now if this is done in the latest Bamboo 5.1, it fails with the build logs throwing something like
        error	03-Sep-2013 17:02:19	Unable to find executable at echo
        command	03-Sep-2013 17:02:19	Beginning to execute external process for build 'TESTA - TSTA - Default Job #17 (TESTA-TSTA-JOB1-17)'\n ... running command line: \necho 17 > sultan.txt\n ... in: D:\atlassian\BAMBOO\atlassian-bamboo-5.1.0\HOME\xml-data\build-dir\TESTA-TSTA-JOB1\n
        simple	03-Sep-2013 17:02:19	Failing task since return code of [echo 17 > sultan.txt] was -1 while expected 0
        

        The atlassian-bamboo.log shows something like:

        com.atlassian.utils.process.ProcessNotStartedException: echo could not be started
        	at com.atlassian.utils.process.ExternalProcessImpl.start(ExternalProcessImpl.java:288)
        	at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:409)
        	at com.atlassian.bamboo.process.ProcessServiceImpl.executeExternalProcess(ProcessServiceImpl.java:211)
        	at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:61)
        	at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:48)
        	at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220)
        	at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98)
        	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)
        	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:189)
        	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102)
        	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108)
        	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55)
        	at java.lang.Thread.run(Thread.java:724)
        

      Attachments

        Activity

          People

            Unassigned Unassigned
            smaiyaki Sultan Maiyaki (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: