As always - I figure it out right after I post to a group. Turns out that go encloses the command in quotes by default, which means the console is interpreting the asterisk as a literal, not as a wildcard. Had to change it to run as bash -c cp -r ./* /var/lib/grafana/grafana and that worked perfectly.
Hope this may help someone else. On Wednesday, June 19, 2019 at 2:58:22 PM UTC-4, Max DiOrio wrote: > > Hi, > > Just starting to use GoCD. I have a Pipeline to push a git repo to a > remote server upon changes. I want to take the checked out repo, which I > believe the working directory is /var/lib/go-agent/pipelines/Grafana/* > > I now want to copy the files to another directory - should be simple, run > a job task with: > > command /bin/cp > Arguments: -r * /var/lib/grafana/grafana > > I have no idea why it can't stat the dir. I logged in as the go user, and > can navigate to the directory and run the command manually and it works > fine. > > Any idea? > > Thanks! > > [go] Task: /usr/bin/pwdtook: 0.103s > /var/lib/go-agent/pipelines/Grafana > [go] Task status: passed, took: 0.103s > [go] Task: /bin/cp -r * /var/lib/grafana/grafanatook: 0.103sexited: 1 > /bin/cp: cannot stat ‘*’: No such file or directory > [go] Task status: failed, took: 0.103s, exited: 1 > [go] Current job status: failed > > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/87c955c0-1e31-4d09-93ee-cd4e934512f1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
