diff --git a/.drone.yml b/.drone.yml index e8bda699..bccff951 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,5 +1,10 @@ image: go1.2 +env: + - GOROOT=/usr/local/go + - GOPATH=/var/cache/drone + - PATH=$GOPATH/bin:$GOPATH/bin:$PATH script: + - sudo apt-get -y install libsqlite3-dev sqlite3 mercurial bzr 1> /dev/null 2> /dev/null - make deps - make - make test diff --git a/pkg/plugin/publish/s3.go b/pkg/plugin/publish/s3.go index 029b0b5f..079be15c 100644 --- a/pkg/plugin/publish/s3.go +++ b/pkg/plugin/publish/s3.go @@ -51,6 +51,14 @@ type S3 struct { } func (s *S3) Write(f *buildfile.Buildfile) { + + // skip if AWS key or SECRET are empty. A good example for this would + // be forks building a project. S3 might be configured in the source + // repo, but not in the fork + if len(s.Key) == 0 || len(s.Secret) == 0 { + return + } + // install the AWS cli using PIP f.WriteCmdSilent("[ -f /usr/bin/sudo ] || pip install awscli 1> /dev/null 2> /dev/null") f.WriteCmdSilent("[ -f /usr/bin/sudo ] && sudo pip install awscli 1> /dev/null 2> /dev/null")