From 938f8cda190a8f365b653f925311e30d657f7b49 Mon Sep 17 00:00:00 2001 From: m00k Date: Fri, 4 Jan 2019 12:08:05 +0100 Subject: [PATCH 01/15] fix issue #17, NoSuchKey --- plugin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 2834a21..121e1d3 100644 --- a/plugin.go +++ b/plugin.go @@ -125,8 +125,9 @@ func (p *Plugin) createSyncJobs() { if p.Delete { for _, r := range remote { found := false + rPath := strings.TrimPrefix(r, p.Target+"/") for _, l := range local { - if l == r { + if l == rPath { found = true break } From 5ecd3598fa6b1b19ebb7aab072faf7e33cad2d8e Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Jan 2019 00:32:13 +0800 Subject: [PATCH 02/15] feat(go): switch dep to go module (#49) as title --- .appveyor.yml | 4 +-- .drone.yml | 23 ++++++------- Gopkg.lock | 94 --------------------------------------------------- Gopkg.toml | 23 ------------- aws.go | 6 ++-- go.mod | 12 +++++++ go.sum | 32 ++++++++++++++++++ main.go | 9 +++-- 8 files changed, 63 insertions(+), 140 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.appveyor.yml b/.appveyor.yml index b2bf601..3c57f4d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,6 +11,7 @@ environment: secure: '4YzzahbEiMZQJpOCOd1LAw==' DOCKER_PASSWORD: secure: 'VqO/G3Zfslu6zSLdwHKO+Q==' + GO111MODULE: on install: - ps: | @@ -21,9 +22,6 @@ install: build_script: - ps: | - go get -u github.com/golang/dep/cmd/dep - dep ensure - if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) { go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-s3-sync.exe } else { diff --git a/.drone.yml b/.drone.yml index 3b9d089..0ae1438 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,28 +3,24 @@ workspace: path: src/github.com/drone-plugins/drone-s3-sync pipeline: - deps: - image: golang:1.10 - pull: true - commands: - - go get -u github.com/golang/dep/cmd/dep - - dep ensure - test: - image: golang:1.10 + image: golang:1.11 pull: true + environment: + - GO111MODULE=on commands: - go vet ./... - go test -cover ./... build_linux_amd64: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: - GOOS=linux - GOARCH=amd64 - CGO_ENABLED=0 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then @@ -34,13 +30,14 @@ pipeline: fi build_linux_i386: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: - GOOS=linux - GOARCH=386 - CGO_ENABLED=0 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then @@ -50,13 +47,14 @@ pipeline: fi build_linux_arm64: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: - GOOS=linux - GOARCH=arm64 - CGO_ENABLED=0 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then @@ -66,7 +64,7 @@ pipeline: fi build_linux_arm: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: @@ -74,6 +72,7 @@ pipeline: - GOARCH=arm - CGO_ENABLED=0 - GOARM=7 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 1cd0fba..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,94 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/Sirupsen/logrus" - packages = ["."] - revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc" - version = "v1.0.5" - -[[projects]] - name = "github.com/aws/aws-sdk-go" - packages = [ - "aws", - "aws/awserr", - "aws/awsutil", - "aws/client", - "aws/client/metadata", - "aws/corehandlers", - "aws/credentials", - "aws/credentials/ec2rolecreds", - "aws/credentials/endpointcreds", - "aws/credentials/stscreds", - "aws/defaults", - "aws/ec2metadata", - "aws/endpoints", - "aws/request", - "aws/session", - "aws/signer/v4", - "internal/sdkio", - "internal/sdkrand", - "internal/shareddefaults", - "private/protocol", - "private/protocol/query", - "private/protocol/query/queryutil", - "private/protocol/rest", - "private/protocol/restxml", - "private/protocol/xml/xmlutil", - "service/cloudfront", - "service/s3", - "service/sts" - ] - revision = "f0872da8a448f8cb10f4f0c95c2100e4f7356448" - version = "v1.13.16" - -[[projects]] - name = "github.com/go-ini/ini" - packages = ["."] - revision = "6333e38ac20b8949a8dd68baa3650f4dee8f39f0" - version = "v1.33.0" - -[[projects]] - name = "github.com/jmespath/go-jmespath" - packages = ["."] - revision = "0b12d6b5" - -[[projects]] - name = "github.com/joho/godotenv" - packages = ["."] - revision = "a79fa1e548e2c689c241d10173efd51e5d689d5b" - version = "v1.2.0" - -[[projects]] - name = "github.com/ryanuber/go-glob" - packages = ["."] - revision = "572520ed46dbddaed19ea3d9541bdd0494163693" - version = "v0.1" - -[[projects]] - name = "github.com/urfave/cli" - packages = ["."] - revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - version = "v1.20.0" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - revision = "374053ea96cb300f8671b8d3b07edeeb06e203b4" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows" - ] - revision = "2f1e207ee39ff70f3433e49c6eb52677a515e3b5" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "0ae6c8475682e1b48bad52d2486af272d0903917f02fcfcf214f81c95cf30db3" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index fff4684..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,23 +0,0 @@ -[[constraint]] - name = "github.com/Sirupsen/logrus" - version = "1.0.5" - -[[constraint]] - name = "github.com/aws/aws-sdk-go" - version = "1.13.16" - -[[constraint]] - name = "github.com/joho/godotenv" - version = "1.2.0" - -[[constraint]] - name = "github.com/ryanuber/go-glob" - version = "0.1.0" - -[[constraint]] - name = "github.com/urfave/cli" - version = "1.20.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/aws.go b/aws.go index 1f73899..f5277c5 100644 --- a/aws.go +++ b/aws.go @@ -310,9 +310,9 @@ func (a *AWS) Redirect(path, location string) error { } _, err := a.client.PutObject(&s3.PutObjectInput{ - Bucket: aws.String(p.Bucket), - Key: aws.String(path), - ACL: aws.String("public-read"), + Bucket: aws.String(p.Bucket), + Key: aws.String(path), + ACL: aws.String("public-read"), WebsiteRedirectLocation: aws.String(location), }) return err diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..6b5b3a3 --- /dev/null +++ b/go.mod @@ -0,0 +1,12 @@ +module github.com/drone-plugins/drone-s3-sync + +require ( + github.com/aws/aws-sdk-go v1.16.15 + github.com/joho/godotenv v1.3.0 + github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 + github.com/sirupsen/logrus v1.3.0 + github.com/stretchr/testify v1.3.0 // indirect + github.com/urfave/cli v1.20.0 + golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1 // indirect + golang.org/x/text v0.3.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..fc79b53 --- /dev/null +++ b/go.sum @@ -0,0 +1,32 @@ +github.com/aws/aws-sdk-go v1.16.15 h1:kQyxfRyjAwIYjf0225sn/pn+WAlncKyI8dmT3+ItMFE= +github.com/aws/aws-sdk-go v1.16.15/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 h1:7YvPJVmEeFHR1Tj9sZEYsmarJEQfMVYpd/Vyy/A8dqE= +github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sirupsen/logrus v1.3.0 h1:hI/7Q+DtNZ2kINb6qt/lS+IyXnHQe9e90POfeewL/ME= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1 h1:GPpXcPUwWLSpS88tNfabqPG/HJ5b2k2yTwzkSx1sf4c= +golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/main.go b/main.go index 62930fb..c37ce84 100644 --- a/main.go +++ b/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/Sirupsen/logrus" "github.com/joho/godotenv" + "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -117,11 +117,10 @@ func main() { Usage: "source env file", }, cli.IntFlag{ - Name: "max-concurrency", - Usage: "customize number concurrent files to process", - Value: 100, + Name: "max-concurrency", + Usage: "customize number concurrent files to process", + Value: 100, EnvVar: "PLUGIN_MAX_CONCURRENCY", - }, } From fcc7aa71fdb95ac7e5ea2f2258b23fd5cbb38a24 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Jan 2019 14:08:40 +0800 Subject: [PATCH 03/15] chore: fix golint error. (#50) --- plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 2834a21..079409c 100644 --- a/plugin.go +++ b/plugin.go @@ -180,7 +180,7 @@ func (p *Plugin) runJobs() { }(j) } - for _ = range p.jobs { + for range p.jobs { r := <-results if r.err != nil { fmt.Printf("ERROR: failed to %s %s to %s: %+v\n", r.j.action, r.j.local, r.j.remote, r.err) From f48d13f2337fff367d199839fcc0c5e81f0b5eb1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 19 Jan 2019 02:59:01 +0000 Subject: [PATCH 04/15] Add renovate.json --- renovate.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..f45d8f1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} From c4a712a4d54ad01a76f717513b7f6951776e50b4 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sat, 19 Jan 2019 11:00:19 +0100 Subject: [PATCH 05/15] Update renovate.json --- renovate.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/renovate.json b/renovate.json index f45d8f1..9980624 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,13 @@ { "extends": [ "config:base" + ], + "docker": { + "fileMatch": [ + "/docker/Dockerfile" + ] + }, + "labels": [ + "renovate" ] } From c28514592de1c78a2f306059470973545be95994 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sun, 20 Jan 2019 20:45:24 +0100 Subject: [PATCH 06/15] Move dockerfiles to docker folder --- Dockerfile.i386 | 9 --------- Dockerfile => docker/Dockerfile.linux.amd64 | 0 Dockerfile.arm => docker/Dockerfile.linux.arm | 0 Dockerfile.arm64 => docker/Dockerfile.linux.arm64 | 0 Dockerfile.windows => docker/Dockerfile.windows.amd64 | 4 +--- 5 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 Dockerfile.i386 rename Dockerfile => docker/Dockerfile.linux.amd64 (100%) rename Dockerfile.arm => docker/Dockerfile.linux.arm (100%) rename Dockerfile.arm64 => docker/Dockerfile.linux.arm64 (100%) rename Dockerfile.windows => docker/Dockerfile.windows.amd64 (66%) diff --git a/Dockerfile.i386 b/Dockerfile.i386 deleted file mode 100644 index df77dbb..0000000 --- a/Dockerfile.i386 +++ /dev/null @@ -1,9 +0,0 @@ -FROM plugins/base:multiarch - -LABEL maintainer="Drone.IO Community " \ - org.label-schema.name="Drone S3 Sync" \ - org.label-schema.vendor="Drone.IO Community" \ - org.label-schema.schema-version="1.0" - -ADD release/linux/i386/drone-s3-sync /bin/ -ENTRYPOINT ["/bin/drone-s3-sync"] diff --git a/Dockerfile b/docker/Dockerfile.linux.amd64 similarity index 100% rename from Dockerfile rename to docker/Dockerfile.linux.amd64 diff --git a/Dockerfile.arm b/docker/Dockerfile.linux.arm similarity index 100% rename from Dockerfile.arm rename to docker/Dockerfile.linux.arm diff --git a/Dockerfile.arm64 b/docker/Dockerfile.linux.arm64 similarity index 100% rename from Dockerfile.arm64 rename to docker/Dockerfile.linux.arm64 diff --git a/Dockerfile.windows b/docker/Dockerfile.windows.amd64 similarity index 66% rename from Dockerfile.windows rename to docker/Dockerfile.windows.amd64 index 3549bd3..4140b58 100644 --- a/Dockerfile.windows +++ b/docker/Dockerfile.windows.amd64 @@ -1,12 +1,10 @@ # escape=` -FROM microsoft/nanoserver:10.0.14393.1593 +FROM plugins/base:windows-amd64 LABEL maintainer="Drone.IO Community " ` org.label-schema.name="Drone S3 Sync" ` org.label-schema.vendor="Drone.IO Community" ` org.label-schema.schema-version="1.0" -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - ADD release\drone-s3-sync.exe c:\drone-s3-sync.exe ENTRYPOINT [ "c:\\drone-s3-sync.exe" ] From 4cb2a29da870273e4d65e40ad961011b004f819d Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sun, 20 Jan 2019 22:21:22 +0100 Subject: [PATCH 07/15] Add manifest template to docker folder --- manifest.tmpl => docker/manifest.tmpl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) rename manifest.tmpl => docker/manifest.tmpl (84%) diff --git a/manifest.tmpl b/docker/manifest.tmpl similarity index 84% rename from manifest.tmpl rename to docker/manifest.tmpl index 09a2960..120feab 100644 --- a/manifest.tmpl +++ b/docker/manifest.tmpl @@ -11,23 +11,21 @@ manifests: platform: architecture: amd64 os: linux - - - image: plugins/s3-sync:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-i386 - platform: - architecture: 386 - os: linux - image: plugins/s3-sync:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 platform: architecture: arm64 os: linux + variant: v8 - image: plugins/s3-sync:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm platform: architecture: arm os: linux + variant: v7 - image: plugins/s3-sync:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-amd64 platform: architecture: amd64 os: windows + variant: 1809 From a277fe24e43117f08dabda1518baf4f75d3135b8 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sun, 20 Jan 2019 23:51:56 +0100 Subject: [PATCH 08/15] Migrate configs to drone 1.0.0 and drop appveyor --- .appveyor.yml | 66 ------- .drone.jsonnet | 161 ++++++++++++++++++ .drone.windows.yml | 70 ++++++++ .drone.yml | 416 ++++++++++++++++++++++++++++++--------------- 4 files changed, 511 insertions(+), 202 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .drone.jsonnet create mode 100644 .drone.windows.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 3c57f4d..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,66 +0,0 @@ -version: '{build}' -image: 'Visual Studio 2017' -platform: 'x64' - -clone_folder: 'c:\gopath\src\github.com\drone-plugins\drone-s3-sync' -max_jobs: 1 - -environment: - GOPATH: c:\gopath - DOCKER_USERNAME: - secure: '4YzzahbEiMZQJpOCOd1LAw==' - DOCKER_PASSWORD: - secure: 'VqO/G3Zfslu6zSLdwHKO+Q==' - GO111MODULE: on - -install: - - ps: | - docker version - go version - - ps: | - $env:Path = "c:\gopath\bin;$env:Path" - -build_script: - - ps: | - if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) { - go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-s3-sync.exe - } else { - $version = $env:APPVEYOR_REPO_TAG_NAME.substring(1) - go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-s3-sync.exe - } - - docker pull microsoft/nanoserver:10.0.14393.1593 - docker build -f Dockerfile.windows -t plugins/s3-sync:windows-amd64 . - -test_script: - - ps: | - docker run --rm plugins/s3-sync:windows-amd64 --version - -deploy_script: - - ps: | - $ErrorActionPreference = 'Stop'; - - if ( $env:APPVEYOR_PULL_REQUEST_NUMBER ) { - Write-Host Nothing to deploy. - } else { - echo $env:DOCKER_PASSWORD | docker login --username $env:DOCKER_USERNAME --password-stdin - - if ( $env:APPVEYOR_REPO_TAG -eq 'true' ) { - $major,$minor,$patch = $env:APPVEYOR_REPO_TAG_NAME.substring(1).split('.') - - docker push plugins/s3-sync:windows-amd64 - - docker tag plugins/s3-sync:windows-amd64 plugins/s3-sync:$major.$minor.$patch-windows-amd64 - docker push plugins/s3-sync:$major.$minor.$patch-windows-amd64 - - docker tag plugins/s3-sync:windows-amd64 plugins/s3-sync:$major.$minor-windows-amd64 - docker push plugins/s3-sync:$major.$minor-windows-amd64 - - docker tag plugins/s3-sync:windows-amd64 plugins/s3-sync:$major-windows-amd64 - docker push plugins/s3-sync:$major-windows-amd64 - } else { - if ( $env:APPVEYOR_REPO_BRANCH -eq 'master' ) { - docker push plugins/s3-sync:windows-amd64 - } - } - } diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..18fc186 --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,161 @@ +local PipelineTesting = { + kind: "pipeline", + name: "testing", + platform: { + os: "linux", + arch: "amd64", + }, + steps: [ + { + name: "vet", + image: "golang:1.11", + pull: "always", + environment: { + GO111MODULE: "on", + }, + commands: [ + "go vet ./...", + ], + }, + { + name: "test", + image: "golang:1.11", + pull: "always", + environment: { + GO111MODULE: "on", + }, + commands: [ + "go test -cover ./...", + ], + }, + ], + trigger: { + branch: [ "master" ], + }, +}; + +local PipelineBuild(os="linux", arch="amd64") = { + kind: "pipeline", + name: os + "-" + arch, + platform: { + os: os, + arch: arch, + }, + steps: [ + { + name: "build", + image: "golang:1.11", + pull: "always", + environment: { + CGO_ENABLED: "0", + GO111MODULE: "on", + }, + commands: [ + "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-s3-sync", + ], + when: { + event: [ "push", "pull_request" ], + }, + }, + { + name: "build", + image: "golang:1.11", + pull: "always", + environment: { + CGO_ENABLED: "0", + GO111MODULE: "on", + }, + commands: [ + "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/" + os + "/" + arch + "/drone-s3-sync", + ], + when: { + event: [ "tag" ], + }, + }, + { + name: "dryrun", + image: "plugins/docker:" + os + "-" + arch, + pull: "always", + settings: { + dry_run: true, + tags: os + "-" + arch, + dockerfile: "docker/Dockerfile." + os + "." + arch, + repo: "plugins/s3-sync", + username: { "from_secret": "docker_username" }, + password: { "from_secret": "docker_password" }, + }, + when: { + event: [ "pull_request" ], + }, + }, + { + name: "publish", + image: "plugins/docker:" + os + "-" + arch, + pull: "always", + settings: { + auto_tag: true, + auto_tag_suffix: os + "-" + arch, + dockerfile: "docker/Dockerfile." + os + "." + arch, + repo: "plugins/s3-sync", + username: { "from_secret": "docker_username" }, + password: { "from_secret": "docker_password" }, + }, + when: { + event: [ "push", "tag" ], + }, + }, + ], + depends_on: [ + "testing", + ], + trigger: { + branch: [ "master" ], + }, +}; + +local PipelineNotifications = { + kind: "pipeline", + name: "notifications", + platform: { + os: "linux", + arch: "amd64", + }, + steps: [ + { + name: "manifest", + image: "plugins/manifest:1", + pull: "always", + settings: { + username: { "from_secret": "docker_username" }, + password: { "from_secret": "docker_password" }, + spec: "docker/manifest.tmpl", + ignore_missing: true, + }, + }, + { + name: "microbadger", + image: "plugins/webhook:1", + pull: "always", + settings: { + url: { "from_secret": "microbadger_url" }, + }, + }, + ], + depends_on: [ + "linux-amd64", + "linux-arm64", + "linux-arm", + ], + trigger: { + branch: [ "master" ], + event: [ "push", "tag" ], + }, +}; + +[ + PipelineTesting, + PipelineBuild("linux", "amd64"), + PipelineBuild("linux", "arm64"), + PipelineBuild("linux", "arm"), + PipelineNotifications, +] diff --git a/.drone.windows.yml b/.drone.windows.yml new file mode 100644 index 0000000..462eb3c --- /dev/null +++ b/.drone.windows.yml @@ -0,0 +1,70 @@ +--- +kind: pipeline +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - push + - pull_request + +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: dryrun + pull: always + image: plugins/docker:linux-amd64 + settings: + dockerfile: docker/Dockerfile.linux.amd64 + dry_run: true + password: + from_secret: docker_password + repo: plugins/s3-sync + tags: linux-amd64 + username: + from_secret: docker_username + when: + event: + - pull_request + +- name: publish + pull: always + image: plugins/docker:linux-amd64 + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + dockerfile: docker/Dockerfile.linux.amd64 + password: + from_secret: docker_password + repo: plugins/s3-sync + username: + from_secret: docker_username + when: + event: + - push + - tag + +trigger: + branch: + - master diff --git a/.drone.yml b/.drone.yml index 0ae1438..a249580 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,147 +1,291 @@ -workspace: - base: /go - path: src/github.com/drone-plugins/drone-s3-sync - -pipeline: - test: - image: golang:1.11 - pull: true - environment: - - GO111MODULE=on - commands: - - go vet ./... - - go test -cover ./... - - build_linux_amd64: - image: golang:1.11 - pull: true - group: build - environment: - - GOOS=linux - - GOARCH=amd64 - - CGO_ENABLED=0 - - GO111MODULE=on - commands: - - | - if test "${DRONE_TAG}" = ""; then - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-s3-sync - else - go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-s3-sync - fi - - build_linux_i386: - image: golang:1.11 - pull: true - group: build - environment: - - GOOS=linux - - GOARCH=386 - - CGO_ENABLED=0 - - GO111MODULE=on - commands: - - | - if test "${DRONE_TAG}" = ""; then - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-s3-sync - else - go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-s3-sync - fi - - build_linux_arm64: - image: golang:1.11 - pull: true - group: build - environment: - - GOOS=linux - - GOARCH=arm64 - - CGO_ENABLED=0 - - GO111MODULE=on - commands: - - | - if test "${DRONE_TAG}" = ""; then - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-s3-sync - else - go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-s3-sync - fi - - build_linux_arm: - image: golang:1.11 - pull: true - group: build - environment: - - GOOS=linux - - GOARCH=arm - - CGO_ENABLED=0 - - GOARM=7 - - GO111MODULE=on - commands: - - | - if test "${DRONE_TAG}" = ""; then - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-s3-sync - else - go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-s3-sync - fi - - publish_linux_amd64: - image: plugins/docker:17.12 - pull: true - secrets: [ docker_username, docker_password ] - group: docker +--- +kind: pipeline +name: testing + +platform: + os: linux + arch: amd64 + +steps: +- name: vet + pull: always + image: golang:1.11 + commands: + - go vet ./... + environment: + GO111MODULE: on + +- name: test + pull: always + image: golang:1.11 + commands: + - go test -cover ./... + environment: + GO111MODULE: on + +trigger: + branch: + - master + +--- +kind: pipeline +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - push + - pull_request + +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: dryrun + pull: always + image: plugins/docker:linux-amd64 + settings: + dockerfile: docker/Dockerfile.linux.amd64 + dry_run: true + password: + from_secret: docker_password repo: plugins/s3-sync + tags: linux-amd64 + username: + from_secret: docker_username + when: + event: + - pull_request + +- name: publish + pull: always + image: plugins/docker:linux-amd64 + settings: auto_tag: true auto_tag_suffix: linux-amd64 - dockerfile: Dockerfile - when: - event: [ push, tag ] - - publish_linux_i386: - image: plugins/docker:17.12 - pull: true - secrets: [ docker_username, docker_password ] - group: docker + dockerfile: docker/Dockerfile.linux.amd64 + password: + from_secret: docker_password repo: plugins/s3-sync - auto_tag: true - auto_tag_suffix: linux-i386 - dockerfile: Dockerfile.i386 - when: - event: [ push, tag ] - - publish_linux_arm64: - image: plugins/docker:17.12 - pull: true - secrets: [ docker_username, docker_password ] - group: docker + username: + from_secret: docker_username + when: + event: + - push + - tag + +trigger: + branch: + - master + +depends_on: +- testing + +--- +kind: pipeline +name: linux-arm64 + +platform: + os: linux + arch: arm64 + +steps: +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - push + - pull_request + +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm64/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: dryrun + pull: always + image: plugins/docker:linux-arm64 + settings: + dockerfile: docker/Dockerfile.linux.arm64 + dry_run: true + password: + from_secret: docker_password repo: plugins/s3-sync + tags: linux-arm64 + username: + from_secret: docker_username + when: + event: + - pull_request + +- name: publish + pull: always + image: plugins/docker:linux-arm64 + settings: auto_tag: true auto_tag_suffix: linux-arm64 - dockerfile: Dockerfile.arm64 - when: - event: [ push, tag ] - - publish_linux_arm: - image: plugins/docker:17.12 - pull: true - secrets: [ docker_username, docker_password ] - group: docker + dockerfile: docker/Dockerfile.linux.arm64 + password: + from_secret: docker_password repo: plugins/s3-sync + username: + from_secret: docker_username + when: + event: + - push + - tag + +trigger: + branch: + - master + +depends_on: +- testing + +--- +kind: pipeline +name: linux-arm + +platform: + os: linux + arch: arm + +steps: +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - push + - pull_request + +- name: build + pull: always + image: golang:1.11 + commands: + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/arm/drone-s3-sync" + environment: + CGO_ENABLED: 0 + GO111MODULE: on + when: + event: + - tag + +- name: dryrun + pull: always + image: plugins/docker:linux-arm + settings: + dockerfile: docker/Dockerfile.linux.arm + dry_run: true + password: + from_secret: docker_password + repo: plugins/s3-sync + tags: linux-arm + username: + from_secret: docker_username + when: + event: + - pull_request + +- name: publish + pull: always + image: plugins/docker:linux-arm + settings: auto_tag: true auto_tag_suffix: linux-arm - dockerfile: Dockerfile.arm - when: - event: [ push, tag ] - - manifests: - image: plugins/manifest:1 - pull: true - secrets: [ docker_username, docker_password ] - spec: manifest.tmpl - auto_tag: true + dockerfile: docker/Dockerfile.linux.arm + password: + from_secret: docker_password + repo: plugins/s3-sync + username: + from_secret: docker_username + when: + event: + - push + - tag + +trigger: + branch: + - master + +depends_on: +- testing + +--- +kind: pipeline +name: notifications + +platform: + os: linux + arch: amd64 + +steps: +- name: manifest + pull: always + image: plugins/manifest:1 + settings: ignore_missing: true - when: - event: [ push, tag ] - - microbadger: - image: plugins/webhook:1 - pull: true - secrets: [ webhook_url ] - when: - status: [ success ] + password: + from_secret: docker_password + spec: docker/manifest.tmpl + username: + from_secret: docker_username + +- name: microbadger + pull: always + image: plugins/webhook:1 + settings: + url: + from_secret: microbadger_url + +trigger: + branch: + - master + event: + - push + - tag + +depends_on: +- linux-amd64 +- linux-arm64 +- linux-arm + +... From c0ee701c7e74204ec751a4a2024a046418710fe4 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 21 Jan 2019 00:19:12 +0100 Subject: [PATCH 09/15] Update badges within readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2912dd8..4a32c40 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # drone-s3-sync -[![Build Status](http://beta.drone.io/api/badges/drone-plugins/drone-s3-sync/status.svg)](http://beta.drone.io/drone-plugins/drone-s3-sync) -[![Join the chat at https://gitter.im/drone/drone](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/drone/drone) +[![Build Status](http://cloud.drone.io/api/badges/drone-plugins/drone-s3-sync/status.svg)](http://cloud.drone.io/drone-plugins/drone-s3-sync) +[![Gitter chat](https://badges.gitter.im/drone/drone.png)](https://gitter.im/drone/drone) +[![Join the discussion at https://discourse.drone.io](https://img.shields.io/badge/discourse-forum-orange.svg)](https://discourse.drone.io) +[![Drone questions at https://stackoverflow.com](https://img.shields.io/badge/drone-stackoverflow-orange.svg)](https://stackoverflow.com/questions/tagged/drone.io) +[![](https://images.microbadger.com/badges/image/plugins/s3-sync.svg)](https://microbadger.com/images/plugins/s3-sync "Get your own image badge on microbadger.com") [![Go Doc](https://godoc.org/github.com/drone-plugins/drone-s3-sync?status.svg)](http://godoc.org/github.com/drone-plugins/drone-s3-sync) [![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-s3-sync)](https://goreportcard.com/report/github.com/drone-plugins/drone-s3-sync) [![](https://images.microbadger.com/badges/image/plugins/s3-sync.svg)](https://microbadger.com/images/plugins/s3-sync "Get your own image badge on microbadger.com") From c935d6c22613588aa9c4bcb983c9f1f499954611 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 21 Jan 2019 01:04:03 +0100 Subject: [PATCH 10/15] Fix duplicated step names --- .drone.jsonnet | 4 ++-- .drone.windows.yml | 20 ++++++++++---------- .drone.yml | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 18fc186..2bab7bd 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -43,7 +43,7 @@ local PipelineBuild(os="linux", arch="amd64") = { }, steps: [ { - name: "build", + name: "build-push", image: "golang:1.11", pull: "always", environment: { @@ -58,7 +58,7 @@ local PipelineBuild(os="linux", arch="amd64") = { }, }, { - name: "build", + name: "build-tag", image: "golang:1.11", pull: "always", environment: { diff --git a/.drone.windows.yml b/.drone.windows.yml index 462eb3c..1e13847 100644 --- a/.drone.windows.yml +++ b/.drone.windows.yml @@ -1,9 +1,9 @@ --- kind: pipeline -name: linux-amd64 +name: windows-amd64 platform: - os: linux + os: windows arch: amd64 steps: @@ -11,7 +11,7 @@ steps: pull: always image: golang:1.11 commands: - - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + - "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-s3-sync" environment: CGO_ENABLED: 0 GO111MODULE: on @@ -24,7 +24,7 @@ steps: pull: always image: golang:1.11 commands: - - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/linux/amd64/drone-s3-sync" + - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -o release/windows/amd64/drone-s3-sync" environment: CGO_ENABLED: 0 GO111MODULE: on @@ -34,14 +34,14 @@ steps: - name: dryrun pull: always - image: plugins/docker:linux-amd64 + image: plugins/docker:windows-amd64 settings: - dockerfile: docker/Dockerfile.linux.amd64 + dockerfile: docker/Dockerfile.windows.amd64 dry_run: true password: from_secret: docker_password repo: plugins/s3-sync - tags: linux-amd64 + tags: windows-amd64 username: from_secret: docker_username when: @@ -50,11 +50,11 @@ steps: - name: publish pull: always - image: plugins/docker:linux-amd64 + image: plugins/docker:windows-amd64 settings: auto_tag: true - auto_tag_suffix: linux-amd64 - dockerfile: docker/Dockerfile.linux.amd64 + auto_tag_suffix: windows-amd64 + dockerfile: docker/Dockerfile.windows.amd64 password: from_secret: docker_password repo: plugins/s3-sync diff --git a/.drone.yml b/.drone.yml index a249580..85aa32e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,7 +36,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-push pull: always image: golang:1.11 commands: @@ -49,7 +49,7 @@ steps: - push - pull_request -- name: build +- name: build-tag pull: always image: golang:1.11 commands: @@ -110,7 +110,7 @@ platform: arch: arm64 steps: -- name: build +- name: build-push pull: always image: golang:1.11 commands: @@ -123,7 +123,7 @@ steps: - push - pull_request -- name: build +- name: build-tag pull: always image: golang:1.11 commands: @@ -184,7 +184,7 @@ platform: arch: arm steps: -- name: build +- name: build-push pull: always image: golang:1.11 commands: @@ -197,7 +197,7 @@ steps: - push - pull_request -- name: build +- name: build-tag pull: always image: golang:1.11 commands: From 21320ce4440d0b5a6672b91dcac1ca2bdaa5b17c Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 21 Jan 2019 09:30:50 +0100 Subject: [PATCH 11/15] Remove duplicated badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4a32c40..7fd0641 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ [![](https://images.microbadger.com/badges/image/plugins/s3-sync.svg)](https://microbadger.com/images/plugins/s3-sync "Get your own image badge on microbadger.com") [![Go Doc](https://godoc.org/github.com/drone-plugins/drone-s3-sync?status.svg)](http://godoc.org/github.com/drone-plugins/drone-s3-sync) [![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-s3-sync)](https://goreportcard.com/report/github.com/drone-plugins/drone-s3-sync) -[![](https://images.microbadger.com/badges/image/plugins/s3-sync.svg)](https://microbadger.com/images/plugins/s3-sync "Get your own image badge on microbadger.com") Drone plugin to synchronize a directory with an Amazon S3 Bucket. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-s3-sync/). From 2fbcc11556935a9fb11addaa7b0fa399aa990c67 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 21 Jan 2019 20:55:46 +0100 Subject: [PATCH 12/15] Add probot settings config --- .github/settings.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/settings.yml diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..1cc8eda --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,73 @@ +repository: + name: drone-s3-sync + description: Drone plugin for syncing artifacts with an Amazon S3 Bucket + homepage: http://plugins.drone.io/drone-plugins/drone-s3-sync + topics: drone, drone-plugin + + private: false + has_issues: true + has_wiki: false + has_downloads: false + + default_branch: master + + allow_squash_merge: true + allow_merge_commit: true + allow_rebase_merge: true + +labels: + - name: bug + color: d73a4a + description: Something isn't working + - name: duplicate + color: cfd3d7 + description: This issue or pull request already exists + - name: enhancement + color: a2eeef + description: New feature or request + - name: good first issue + color: 7057ff + description: Good for newcomers + - name: help wanted + color: 008672 + description: Extra attention is needed + - name: invalid + color: e4e669 + description: This doesn't seem right + - name: question + color: d876e3 + description: Further information is requested + - name: renovate + color: e99695 + description: Automated action from Renovate + - name: wontfix + color: ffffff + description: This will not be worked on + +teams: + - name: Admins + permission: admin + - name: Captain + permission: admin + - name: Maintainers + permission: push + +branches: + - name: master + protection: + required_pull_request_reviews: + required_approving_review_count: 1 + dismiss_stale_reviews: false + require_code_owner_reviews: false + dismissal_restrictions: + teams: + - Admins + - Captain + required_status_checks: + strict: true + contexts: + - continuous-integration/drone/pr + enforce_admins: false + restrictions: + users: [] + teams: [] From 942d158c0e134bb12a7b51081e81640cc424e016 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 21 Jan 2019 21:02:05 +0100 Subject: [PATCH 13/15] Add some basic issue template content --- .github/issue_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/issue_template.md b/.github/issue_template.md index e69de29..3f95605 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -0,0 +1,9 @@ + From 502e6ceee05f9d53662b3dd335651c62068e5bc3 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 22 Jan 2019 23:11:11 +0100 Subject: [PATCH 14/15] Execute built binary as simple test --- .drone.jsonnet | 8 ++++++++ .drone.windows.yml | 10 ++++++++-- .drone.yml | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 2bab7bd..934f9b5 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -72,6 +72,14 @@ local PipelineBuild(os="linux", arch="amd64") = { event: [ "tag" ], }, }, + { + name: "executable", + image: "golang:1.11", + pull: "always", + commands: [ + "./release/" + os + "/" + arch + "/drone-s3-sync --help", + ], + }, { name: "dryrun", image: "plugins/docker:" + os + "-" + arch, diff --git a/.drone.windows.yml b/.drone.windows.yml index 1e13847..c3a06dc 100644 --- a/.drone.windows.yml +++ b/.drone.windows.yml @@ -7,7 +7,7 @@ platform: arch: amd64 steps: -- name: build +- name: build-push pull: always image: golang:1.11 commands: @@ -20,7 +20,7 @@ steps: - push - pull_request -- name: build +- name: build-tag pull: always image: golang:1.11 commands: @@ -32,6 +32,12 @@ steps: event: - tag +- name: executable + pull: always + image: golang:1.11 + commands: + - ./release/windows/amd64/drone-s3-sync --help + - name: dryrun pull: always image: plugins/docker:windows-amd64 diff --git a/.drone.yml b/.drone.yml index 85aa32e..a216aa1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,6 +61,12 @@ steps: event: - tag +- name: executable + pull: always + image: golang:1.11 + commands: + - ./release/linux/amd64/drone-s3-sync --help + - name: dryrun pull: always image: plugins/docker:linux-amd64 @@ -135,6 +141,12 @@ steps: event: - tag +- name: executable + pull: always + image: golang:1.11 + commands: + - ./release/linux/arm64/drone-s3-sync --help + - name: dryrun pull: always image: plugins/docker:linux-arm64 @@ -209,6 +221,12 @@ steps: event: - tag +- name: executable + pull: always + image: golang:1.11 + commands: + - ./release/linux/arm/drone-s3-sync --help + - name: dryrun pull: always image: plugins/docker:linux-arm From 1f42ce6aedfbc1f07d79383921e42dfbb24b2175 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 23 Jan 2019 10:07:59 +0000 Subject: [PATCH 15/15] Update golang.org/x/net commit hash to ed066c8 --- go.mod | 2 +- go.sum | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 6b5b3a3..4616eb5 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,6 @@ require ( github.com/sirupsen/logrus v1.3.0 github.com/stretchr/testify v1.3.0 // indirect github.com/urfave/cli v1.20.0 - golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1 // indirect + golang.org/x/net v0.0.0-20190123100745-ed066c81e75e // indirect golang.org/x/text v0.3.0 // indirect ) diff --git a/go.sum b/go.sum index fc79b53..1252f9b 100644 --- a/go.sum +++ b/go.sum @@ -26,6 +26,7 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1 h1:GPpXcPUwWLSpS88tNfabqPG/HJ5b2k2yTwzkSx1sf4c= golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190123100745-ed066c81e75e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=