Custom Command Path/Context

Follow

Comments

4 comments

  • Avatar
    Jyoti Singh

    Hi Ali,

    Altering PATH in .bash_profile doesn't help as the first version of the command is not being executed in a shell environment. Also, you need to ensure that the command you wish to run is available in the PATH. This could be verified by adding the following task to your pipeline:

      <exec command="/bin/bash">
            <arg>-c</arg>
            <arg>echo $PATH</arg>
            <runif status="passed" />
      </exec>

    This won't fix anything but would surely help you with debugging such issues.

    Cheers,

    Jyoti

  • Avatar
    Ali Hamidi

    Hi Jyoti,

    I realized that the .bash_profile wasn't being used, which is why I'd explicitly set the Path in the environment variable for that stage.

    I'll checkout your suggestion to see what's actually happening with the Path.

    Thanks,

    Ali

  • Avatar
    Aravind SV

    Hi Ali,

    More information (logs or screenshots) will probably help. But, this might help. These two ways of specifying custom command (shown below) should be exactly the same. Are you facing problems with something like this?

    Also, we're moving from this forum to the Go users group on Google Groups. Please use that, if you have any further questions. There are more people on it.

    Cheers,

    Aravind

    Screen_Shot_2014-03-19_at_10.39.54_am.png

    AND

    Screen_Shot_2014-03-19_at_10.39.40_am.png

     

     

  • Avatar
    Ali Hamidi

    Hi Aravind,

    I'll move this thread over to the Google Group, but just wanted to reply here as well.

    Just to clarify, the first approach works for me (as expected), but the second does not.

    No matter what I do with the second approach, the command doesn't get executed and instead I get the error message saying something along the lines of "Please ensure that the command can be executed on the agent".

    I thought it could be a Path issue, where Go wasn't able to find the binary that I'm calling, but I've added the correct path to the .bash_profile of the Go user and I've explicitly added the Path using environment variables for that pipeline, but neither seemed to help.

    Thanks,

    Ali

Please sign in to leave a comment.