I'd probably run `/bin/sh -c env` to dump all the environment variables to
check if there's something in there that may be causing issues.

Sometimes it's just the wrong PATH, or LD_LIBRARY_PATH, or a dozen other
variables that can cause this to not work as expected.

I'd also try using `/bin/bash` instead of `/bin/sh`. `/bin/sh` on some
linux distributions is a minimal shell with very little in the way of
showing error messages when things go as expected.

On Fri, Apr 13, 2018 at 10:47 PM David Joos <david.j...@gmail.com> wrote:

> Hi there,
>
> I've got a pipeline template where after fetching an artifact (eg.
> artifact.tar.gz) successfully, we untar the artifact via a custom command
> (`/bin/sh -c "tar xvzf \"artifact.tar.gz\""`).
>
> On a new project we're only seeing failures in GoCDs console tab:
> ```
>
> [go] Task: /bin/sh -c "tar xvzf \"artifact.tar.gz\"" took: 0.23s
> [go] Task status: failed, took: 0.23s
>
> ```
> ...without any further information on why / what is happening exactly.
>
> When executing  `/bin/sh -c "tar xvzf \"artifact.tar.gz\""` command as the
> 'go' user on the GoCD agent itself via the cli
> (/var/lib/go-agent/pipelines/artifact_pipeline_name), the command untars
> the file perfectly, as expected. `echo $?` also underlines the command
> exited cleanly (0), so I'm unsure why we don't get to see this when GoCD
> runs the task...
>
> Is there any more verbose logging I could turn on/dig into on the GoCD
> agent to get to the bottom of this issue? This has been baffling me for too
> long now :-)
>
> Thanks in advance for your help!
>
> Kind regards,
> David
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-cd+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to