Skip to content

Commit 28d6552

Browse files
authored
Merge branch 'master' into rm-signed-yaml
2 parents 205c76b + 9c692dd commit 28d6552

File tree

182 files changed

+456
-52553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+456
-52553
lines changed

.appveyor.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: '{build}'
2+
image: 'Visual Studio 2017'
3+
platform: 'x64'
4+
5+
clone_folder: 'c:\gopath\src\github.com\drone-plugins\drone-s3'
6+
max_jobs: 1
7+
8+
environment:
9+
GOPATH: c:\gopath
10+
DOCKER_USERNAME:
11+
secure: '4YzzahbEiMZQJpOCOd1LAw=='
12+
DOCKER_PASSWORD:
13+
secure: 'VqO/G3Zfslu6zSLdwHKO+Q=='
14+
15+
install:
16+
- ps: |
17+
docker version
18+
go version
19+
- ps: |
20+
$env:Path = "c:\gopath\bin;$env:Path"
21+
22+
build_script:
23+
- ps: |
24+
go get -u github.com/golang/dep/cmd/dep
25+
dep ensure
26+
27+
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
28+
go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-s3.exe
29+
} else {
30+
$version = $env:APPVEYOR_REPO_TAG_NAME.substring(1)
31+
go build -ldflags "-X main.version=$version -X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-s3.exe
32+
}
33+
34+
docker pull microsoft/nanoserver:10.0.14393.1593
35+
docker build -f Dockerfile.windows -t plugins/s3:windows-amd64 .
36+
37+
test_script:
38+
- ps: |
39+
docker run --rm plugins/s3:windows-amd64 --version
40+
41+
deploy_script:
42+
- ps: |
43+
$ErrorActionPreference = 'Stop';
44+
45+
if ( $env:APPVEYOR_PULL_REQUEST_NUMBER ) {
46+
Write-Host Nothing to deploy.
47+
} else {
48+
echo $env:DOCKER_PASSWORD | docker login --username $env:DOCKER_USERNAME --password-stdin
49+
50+
if ( $env:APPVEYOR_REPO_TAG -eq 'true' ) {
51+
$major,$minor,$patch = $env:APPVEYOR_REPO_TAG_NAME.substring(1).split('.')
52+
53+
docker push plugins/s3:windows-amd64
54+
55+
docker tag plugins/s3:windows-amd64 plugins/s3:$major.$minor.$patch-windows-amd64
56+
docker push plugins/s3:$major.$minor.$patch-windows-amd64
57+
58+
docker tag plugins/s3:windows-amd64 plugins/s3:$major.$minor-windows-amd64
59+
docker push plugins/s3:$major.$minor-windows-amd64
60+
61+
docker tag plugins/s3:windows-amd64 plugins/s3:$major-windows-amd64
62+
docker push plugins/s3:$major-windows-amd64
63+
} else {
64+
if ( $env:APPVEYOR_REPO_BRANCH -eq 'master' ) {
65+
docker push plugins/s3:windows-amd64
66+
}
67+
}
68+
}

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!release/

.drone.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

.drone.yml

Lines changed: 128 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,146 @@ workspace:
33
path: src/github.com/drone-plugins/drone-s3
44

55
pipeline:
6+
deps:
7+
image: golang:1.10
8+
pull: true
9+
commands:
10+
- go get -u github.com/golang/dep/cmd/dep
11+
- dep ensure
12+
613
test:
7-
image: golang:1.8
14+
image: golang:1.10
15+
pull: true
816
commands:
9-
- go vet
10-
- go test -cover -coverprofile=coverage.out
17+
- go vet ./...
18+
- go test -cover ./...
1119

12-
build:
13-
image: golang:1.8
14-
commands: sh .drone.sh
15-
when:
16-
branch: master
17-
event: push
20+
build_linux_amd64:
21+
image: golang:1.10
22+
pull: true
23+
group: build
24+
environment:
25+
- GOOS=linux
26+
- GOARCH=amd64
27+
- CGO_ENABLED=0
28+
commands:
29+
- |
30+
if test "${DRONE_TAG}" = ""; then
31+
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-s3
32+
else
33+
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-s3
34+
fi
35+
36+
build_linux_i386:
37+
image: golang:1.10
38+
pull: true
39+
group: build
40+
environment:
41+
- GOOS=linux
42+
- GOARCH=386
43+
- CGO_ENABLED=0
44+
commands:
45+
- |
46+
if test "${DRONE_TAG}" = ""; then
47+
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-s3
48+
else
49+
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-s3
50+
fi
51+
52+
build_linux_arm64:
53+
image: golang:1.10
54+
pull: true
55+
group: build
56+
environment:
57+
- GOOS=linux
58+
- GOARCH=arm64
59+
- CGO_ENABLED=0
60+
commands:
61+
- |
62+
if test "${DRONE_TAG}" = ""; then
63+
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-s3
64+
else
65+
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-s3
66+
fi
67+
68+
build_linux_arm:
69+
image: golang:1.10
70+
pull: true
71+
group: build
72+
environment:
73+
- GOOS=linux
74+
- GOARCH=arm
75+
- CGO_ENABLED=0
76+
- GOARM=7
77+
commands:
78+
- |
79+
if test "${DRONE_TAG}" = ""; then
80+
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-s3
81+
else
82+
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-s3
83+
fi
1884
1985
publish_linux_amd64:
20-
image: plugins/docker
21-
repo: plugins/s3
22-
tags: [ "latest", "1.2", "1" ]
86+
image: plugins/docker:17.12
87+
pull: true
2388
secrets: [ docker_username, docker_password ]
89+
group: docker
90+
repo: plugins/s3
91+
auto_tag: true
92+
auto_tag_suffix: linux-amd64
93+
dockerfile: Dockerfile
2494
when:
25-
branch: master
26-
event: push
95+
event: [ push, tag ]
2796

28-
publish_linux_armhf:
29-
image: plugins/docker
97+
publish_linux_i386:
98+
image: plugins/docker:17.12
99+
pull: true
100+
secrets: [ docker_username, docker_password ]
101+
group: docker
30102
repo: plugins/s3
31-
tags: [ "linux-arm" ]
32-
dockerfile: Dockerfile.armhf
103+
auto_tag: true
104+
auto_tag_suffix: linux-i386
105+
dockerfile: Dockerfile.i386
106+
when:
107+
event: [ push, tag ]
108+
109+
publish_linux_arm64:
110+
image: plugins/docker:17.12
111+
pull: true
33112
secrets: [ docker_username, docker_password ]
113+
group: docker
114+
repo: plugins/s3
115+
auto_tag: true
116+
auto_tag_suffix: linux-arm64
117+
dockerfile: Dockerfile.arm64
34118
when:
35-
branch: master
36-
event: push
119+
event: [ push, tag ]
37120

38-
publish_linux_aarch64:
39-
image: plugins/docker
121+
publish_linux_arm:
122+
image: plugins/docker:17.12
123+
pull: true
124+
secrets: [ docker_username, docker_password ]
125+
group: docker
40126
repo: plugins/s3
41-
tags: [ "linux-arm64" ]
42-
dockerfile: Dockerfile.aarch64
127+
auto_tag: true
128+
auto_tag_suffix: linux-arm
129+
dockerfile: Dockerfile.arm
130+
when:
131+
event: [ push, tag ]
132+
133+
manifests:
134+
image: plugins/manifest:1
135+
pull: true
43136
secrets: [ docker_username, docker_password ]
137+
spec: manifest.tmpl
138+
auto_tag: true
139+
ignore_missing: true
140+
when:
141+
event: [ push, tag ]
142+
143+
microbadger:
144+
image: plugins/webhook:1
145+
pull: true
146+
secrets: [ webhook_url ]
44147
when:
45-
branch: master
46-
event: push
148+
status: [ success ]

.github/issue_template.md

Whitespace-only changes.

.github/pull_request_template.md

Whitespace-only changes.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ _testmain.go
2222
*.exe
2323
*.test
2424
*.prof
25-
.env
25+
26+
release/
27+
vendor/
2628

2729
coverage.out
2830
drone-s3

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
FROM centurylink/ca-certs
2-
ENV GODEBUG=netdns=go
1+
FROM plugins/base:multiarch
2+
3+
LABEL maintainer="Drone.IO Community <[email protected]>" \
4+
org.label-schema.name="Drone S3" \
5+
org.label-schema.vendor="Drone.IO Community" \
6+
org.label-schema.schema-version="1.0"
37

4-
ADD contrib/mime.types /etc/
58
ADD release/linux/amd64/drone-s3 /bin/
69
ENTRYPOINT ["/bin/drone-s3"]

Dockerfile.aarch64

Lines changed: 0 additions & 6 deletions
This file was deleted.

Dockerfile.arm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM plugins/base:multiarch
2+
3+
LABEL maintainer="Drone.IO Community <[email protected]>" \
4+
org.label-schema.name="Drone S3" \
5+
org.label-schema.vendor="Drone.IO Community" \
6+
org.label-schema.schema-version="1.0"
7+
8+
ADD release/linux/arm/drone-s3 /bin/
9+
ENTRYPOINT ["/bin/drone-s3"]

0 commit comments

Comments
 (0)