Thanks for the input Ketan and André!
I've turned up the log level for `com.thoughtworks.go.util.comm
and.CommandLine` on the agent and modified from `/bin/sh -c "tar xvzf
"project.tar.gz"` to `/bin/sh -xc "tar xvzf "project.tar.gz"`, but the log
in `/var/lib/go-agent/logs/go-agent.log` is still not giving any further
information as to why the task fails...
*INFO [loopThread] FileHandler:66 - [Artifact File Download] [Fri Apr 20
10:54:26 UTC 2018] Download of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:68 - [Artifact File Download] [Fri Apr 20
10:54:26 UTC 2018] Download of artifact project.tar.gz ended*
*INFO [loopThread] FileHandler:75 - [Artifact File Download] [Fri Apr 20
10:54:26 UTC 2018] Checksum computation of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:78 - [Artifact File Download] [Fri Apr 20
10:54:26 UTC 2018] Checksum computation of artifact project.tar.gz ended*
*INFO [loopThread] CommandLine:366 - Running command: /bin/sh -xc tar xvzf
"project.tar.gz"*
*INFO [loopThread] DefaultGoPublisher:99 - Agent [my-agent,
XXX.XXX.XXX.XXX, my-agent] is reporting build result [Failed] to Go Server
for Build [qa_project/1/prepare/1/package/169]*
Re: specifying the tar command directly
I've tried this as well, unsuccessfully.
*INFO [loopThread] FileHandler:66 - [Artifact File Download] [Fri Apr 20
11:05:40 UTC 2018] Download of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:68 - [Artifact File Download] [Fri Apr 20
11:05:40 UTC 2018] Download of artifact project.tar.gz ended*
*INFO [loopThread] FileHandler:75 - [Artifact File Download] [Fri Apr 20
11:05:40 UTC 2018] Checksum computation of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:78 - [Artifact File Download] [Fri Apr 20
11:05:40 UTC 2018] Checksum computation of artifact project.tar.gz ended*
*INFO [loopThread] CommandLine:366 - Running command: tar xvzf
project.tar.gz*
*INFO [loopThread] DefaultGoPublisher:99 - Agent [my-agent,
XXX.XXX.XXX.XXX, my-agent] is reporting build result [Failed] to Go Server
for Build [qa_project/1/prepare/2/package/170]*
Taking tar out of the equasion, even a simple `/bin/sh -c echo "been here"`
fails:
*INFO [loopThread] FileHandler:66 - [Artifact File Download] [Fri Apr 20
11:09:26 UTC 2018] Download of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:68 - [Artifact File Download] [Fri Apr 20
11:09:26 UTC 2018] Download of artifact project.tar.gz ended*
*INFO [loopThread] FileHandler:75 - [Artifact File Download] [Fri Apr 20
11:09:26 UTC 2018] Checksum computation of artifact project.tar.gz started*
*INFO [loopThread] FileHandler:78 - [Artifact File Download] [Fri Apr 20
11:09:26 UTC 2018] Checksum computation of artifact project.tar.gz ended*
*INFO [loopThread] CommandLine:366 - Running command: /bin/bash -c echo
"been here"*
*INFO [loopThread] DefaultGoPublisher:99 - Agent [my-agent,
XXX.XXX.XXX.XXX, my-agent] is reporting build result [Failed] to Go Server
for Build [qa_project/1/prepare/3/package/171]*
*It's baffling as the same template in another pipeline on the same agent
works without any issues.*
*INFO [loopThread] FileHandler:66 - [Artifact File Download] [Fri Apr 20
11:15:34 UTC 2018] Download of artifact another_project.tar.gz started*
*INFO [loopThread] FileHandler:68 - [Artifact File Download] [Fri Apr
20 11:15:34 UTC 2018] Download of artifact another_project.tar.gz ended*
*INFO [loopThread] FileHandler:75 - [Artifact File Download] [Fri Apr
20 11:15:34 UTC 2018] Checksum computation of artifact
another_project.tar.gz started*
*INFO [loopThread] FileHandler:78 - [Artifact File Download] [Fri Apr
20 11:15:34 UTC 2018] Checksum computation of artifact
another_project.tar.gz ended*
*INFO [loopThread] CommandLine:366 - Running command: /bin/sh -xc tar xvzf
"another_project.tar.gz"*
*INFO [Thread-408] CommandLine:51 - README.md*
Result: all files in the archive extract as expected
*To add to the confusion: running the command as the go user on the agent
("my-agent") for the pipeline succeeds without a problem:*
*/var/lib/go-agent/pipelines/qa_project$
lsbuild_project_package_package_md5.checksumproject.tar.gz/var/lib/go-agent/pipelines/qa_project$
/bin/sh -c "tar xvzf project.tar.gz"Result: the file is extracted without
any issue*
Any help or pointers greatly appreciated, thanks in advance!
David
2018-04-20 11:16 GMT+01:00 André Neves <[email protected]>:
> Have you tried to specify the command in this format?
> Please adjust the working dir as appropriate. This works fine for me.
>
> --
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.