2016-05-13 06:54:07 +00:00
|
|
|
workspace:
|
|
|
|
base: /go
|
2017-08-28 21:31:49 +00:00
|
|
|
path: src/github.com/drone-plugins/drone-s3-sync
|
2016-05-13 06:54:07 +00:00
|
|
|
|
|
|
|
pipeline:
|
2018-04-25 01:10:51 +00:00
|
|
|
deps:
|
|
|
|
image: golang:1.10
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- go get -u github.com/golang/dep/cmd/dep
|
|
|
|
- dep ensure
|
|
|
|
|
2016-07-31 17:06:39 +00:00
|
|
|
test:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: golang:1.10
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2016-05-13 06:54:07 +00:00
|
|
|
commands:
|
2018-04-25 01:10:51 +00:00
|
|
|
- go vet ./...
|
|
|
|
- go test -cover ./...
|
2015-10-16 20:09:45 +00:00
|
|
|
|
2017-08-28 21:31:49 +00:00
|
|
|
build_linux_amd64:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: golang:1.10
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
group: build
|
|
|
|
environment:
|
|
|
|
- GOOS=linux
|
|
|
|
- GOARCH=amd64
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
commands:
|
2018-04-25 01:10:51 +00:00
|
|
|
- |
|
|
|
|
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.10
|
|
|
|
pull: true
|
|
|
|
group: build
|
|
|
|
environment:
|
|
|
|
- GOOS=linux
|
|
|
|
- GOARCH=386
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
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
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
build_linux_arm64:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: golang:1.10
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
group: build
|
|
|
|
environment:
|
|
|
|
- GOOS=linux
|
|
|
|
- GOARCH=arm64
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
commands:
|
2018-04-25 01:10:51 +00:00
|
|
|
- |
|
|
|
|
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
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
build_linux_arm:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: golang:1.10
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
group: build
|
|
|
|
environment:
|
|
|
|
- GOOS=linux
|
|
|
|
- GOARCH=arm
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
- GOARM=7
|
|
|
|
commands:
|
2018-04-25 01:10:51 +00:00
|
|
|
- |
|
|
|
|
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
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
publish_linux_amd64:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: plugins/docker:17.12
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2018-04-25 01:10:51 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
group: docker
|
2017-08-28 21:31:49 +00:00
|
|
|
repo: plugins/s3-sync
|
2018-04-25 01:10:51 +00:00
|
|
|
auto_tag: true
|
|
|
|
auto_tag_suffix: linux-amd64
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
when:
|
|
|
|
event: [ push, tag ]
|
|
|
|
|
|
|
|
publish_linux_i386:
|
|
|
|
image: plugins/docker:17.12
|
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
2018-04-25 01:10:51 +00:00
|
|
|
group: docker
|
|
|
|
repo: plugins/s3-sync
|
|
|
|
auto_tag: true
|
|
|
|
auto_tag_suffix: linux-i386
|
|
|
|
dockerfile: Dockerfile.i386
|
2017-08-28 21:31:49 +00:00
|
|
|
when:
|
2018-04-25 01:10:51 +00:00
|
|
|
event: [ push, tag ]
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
publish_linux_arm64:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: plugins/docker:17.12
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
2018-04-25 01:10:51 +00:00
|
|
|
group: docker
|
|
|
|
repo: plugins/s3-sync
|
|
|
|
auto_tag: true
|
|
|
|
auto_tag_suffix: linux-arm64
|
2017-08-28 21:31:49 +00:00
|
|
|
dockerfile: Dockerfile.arm64
|
2016-01-18 21:32:57 +00:00
|
|
|
when:
|
2018-04-25 01:10:51 +00:00
|
|
|
event: [ push, tag ]
|
2015-10-16 20:09:45 +00:00
|
|
|
|
2017-08-28 21:31:49 +00:00
|
|
|
publish_linux_arm:
|
2018-04-25 01:10:51 +00:00
|
|
|
image: plugins/docker:17.12
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
2018-04-25 01:10:51 +00:00
|
|
|
group: docker
|
|
|
|
repo: plugins/s3-sync
|
|
|
|
auto_tag: true
|
|
|
|
auto_tag_suffix: linux-arm
|
2017-08-28 21:31:49 +00:00
|
|
|
dockerfile: Dockerfile.arm
|
|
|
|
when:
|
2018-04-25 01:10:51 +00:00
|
|
|
event: [ push, tag ]
|
2017-08-28 21:31:49 +00:00
|
|
|
|
2018-04-25 01:10:51 +00:00
|
|
|
manifests:
|
|
|
|
image: plugins/manifest:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
spec: manifest.tmpl
|
|
|
|
auto_tag: true
|
|
|
|
ignore_missing: true
|
|
|
|
when:
|
|
|
|
event: [ push, tag ]
|
2017-08-28 21:31:49 +00:00
|
|
|
|
2017-09-02 17:07:20 +00:00
|
|
|
microbadger:
|
|
|
|
image: plugins/webhook:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ webhook_url ]
|
|
|
|
when:
|
|
|
|
status: [ success ]
|