drone-plugins / drone-rsync

Drone plugin for deploying code using rsync
Apache License 2.0
8 stars 11 forks source link

Ability to add additional rsync flags, such as no-perms #12

Open shankie-codes opened 8 years ago

shankie-codes commented 8 years ago

Great plugin, guys. This has really helped me out.

However, I'd really like to be able to use the --no-perms rsync flag so that rsync doesn't chown once it's sent the files. Is this possible?

Thanks!

tboerger commented 8 years ago

Pull requests are welcome for additional rsync flags

shankie-codes commented 8 years ago

Fair enough.

I don't know any Go, but I guess I can always try!

shankie-codes commented 8 years ago

That actually looks pretty easy, modelling it on the recursive flag. I'll give it a go!

shankie-codes commented 8 years ago

This is probably more work for you than adding the flag yourself (as I can see it's only a handful of lines of code), but it would be useful if the docs for this (and other plugins) included some instructions on how to build the project using a Docker container of golang. I'm not a Go dev (and am having some trouble getting Go working on my local machine).

Any interest in showing us how to build, assuming no golang on the host?

tboerger commented 8 years ago

You can also use the drone CLI for that. drone exec doesn't require any drone server, it just requires docker ;)

shankie-codes commented 8 years ago

Sweet! Will give that a go.

shankie-codes commented 8 years ago

Right, I've got the drone CLI! But am still being a newb.

I'm running drone exec or drone exec docker in my drone-rsync dir. It looks like go get -t fails with the following splurge:

go get -t ./...
google.golang.org/cloud/internal/opts/option.go:12:2: cannot find package "google.golang.org/grpc" in any of:
    /usr/local/go/src/google.golang.org/grpc (from $GOROOT)
    /drone/src/google.golang.org/grpc (from $GOPATH)
google.golang.org/cloud/bigquery/bigquery.go:26:2: cannot find package "google.golang.org/api/bigquery/v2" in any of:
    /usr/local/go/src/google.golang.org/api/bigquery/v2 (from $GOROOT)
    /drone/src/google.golang.org/api/bigquery/v2 (from $GOPATH)
google.golang.org/cloud/internal/transport/dial.go:28:2: cannot find package "google.golang.org/grpc/credentials" in any of:
    /usr/local/go/src/google.golang.org/grpc/credentials (from $GOROOT)
    /drone/src/google.golang.org/grpc/credentials (from $GOPATH)
google.golang.org/cloud/internal/transport/dial.go:29:2: cannot find package "google.golang.org/grpc/credentials/oauth" in any of:
    /usr/local/go/src/google.golang.org/grpc/credentials/oauth (from $GOROOT)
    /drone/src/google.golang.org/grpc/credentials/oauth (from $GOPATH)
google.golang.org/cloud/bigtable/bigtable.go:32:2: cannot find package "google.golang.org/grpc/codes" in any of:
    /usr/local/go/src/google.golang.org/grpc/codes (from $GOROOT)
    /drone/src/google.golang.org/grpc/codes (from $GOPATH)
google.golang.org/cloud/container/container.go:27:2: cannot find package "google.golang.org/api/container/v1" in any of:
    /usr/local/go/src/google.golang.org/api/container/v1 (from $GOROOT)
    /drone/src/google.golang.org/api/container/v1 (from $GOPATH)
google.golang.org/cloud/pubsub/legacy.go:25:2: cannot find package "google.golang.org/api/googleapi" in any of:
    /usr/local/go/src/google.golang.org/api/googleapi (from $GOROOT)
    /drone/src/google.golang.org/api/googleapi (from $GOPATH)
google.golang.org/cloud/pubsub/legacy.go:26:2: cannot find package "google.golang.org/api/pubsub/v1" in any of:
    /usr/local/go/src/google.golang.org/api/pubsub/v1 (from $GOROOT)
    /drone/src/google.golang.org/api/pubsub/v1 (from $GOPATH)
google.golang.org/cloud/storage/acl.go:21:2: cannot find package "google.golang.org/api/storage/v1" in any of:
    /usr/local/go/src/google.golang.org/api/storage/v1 (from $GOROOT)
    /drone/src/google.golang.org/api/storage/v1 (from $GOPATH)
google.golang.org/cloud/logging/logging.go:28:2: cannot find package "google.golang.org/api/logging/v1beta3" in any of:
    /usr/local/go/src/google.golang.org/api/logging/v1beta3 (from $GOROOT)
    /drone/src/google.golang.org/api/logging/v1beta3 (from $GOPATH)
make: *** [deps] Error 1
Makefile:16: recipe for target 'deps' failed
[info] build failed (exit code 2)
[DRONE] finished job #1
[DRONE] exit code 2
[DRONE] job #1 failed
[DRONE] build failed

Any ideas?

Thanks for your help so far @tboerger

tboerger commented 8 years ago

I can't tell you why but it looks like the download of the dependencies fails

shankie-codes commented 8 years ago

That's what I thought, but I don't know why either.

Oddly, I've tried drone exec docker again and it's come back with significantly less failed dependencies – all the ones above seem to be satisfied, but now it complains about

google.golang.org/grpc/grpclog/glogger/glogger.go:40:2: cannot find package "github.com/golang/glog" in any of:
    /usr/local/go/src/github.com/golang/glog (from $GOROOT)
    /drone/src/github.com/golang/glog (from $GOPATH)

How queer.