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:
|
2016-07-31 17:06:39 +00:00
|
|
|
test:
|
2017-08-28 21:31:49 +00:00
|
|
|
image: golang:1.9
|
2017-09-02 17:07:20 +00:00
|
|
|
pull: true
|
2016-05-13 06:54:07 +00:00
|
|
|
commands:
|
2016-07-31 17:06:39 +00:00
|
|
|
- go vet
|
|
|
|
- go test -cover -coverprofile=coverage.out
|
2015-10-16 20:09:45 +00:00
|
|
|
|
2017-08-28 21:31:49 +00:00
|
|
|
build_linux_amd64:
|
|
|
|
image: golang:1.9
|
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:
|
2017-08-29 21:04:22 +00:00
|
|
|
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-s3-sync
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
build_linux_arm64:
|
|
|
|
image: golang:1.9
|
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:
|
2017-08-29 21:04:22 +00:00
|
|
|
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-s3-sync
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
build_linux_arm:
|
|
|
|
image: golang:1.9
|
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:
|
2017-08-29 21:04:22 +00:00
|
|
|
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-s3-sync
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
# build_windows_amd64:
|
|
|
|
# image: golang:1.9-nanoserver
|
2017-09-02 17:07:20 +00:00
|
|
|
# pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
# group: build
|
|
|
|
# environment:
|
|
|
|
# - GOOS=windows
|
|
|
|
# - GOARCH=amd64
|
|
|
|
# - CGO_ENABLED=0
|
|
|
|
# commands:
|
2017-08-29 21:04:22 +00:00
|
|
|
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-s3-sync
|
2017-08-28 21:31:49 +00:00
|
|
|
|
|
|
|
publish_linux_amd64:
|
2017-09-02 17:07:20 +00:00
|
|
|
image: plugins/docker:17.05
|
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
repo: plugins/s3-sync
|
|
|
|
tags: [ latest, 1.1.0, 1.1, 1 ]
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
when:
|
|
|
|
branch: master
|
|
|
|
event: push
|
|
|
|
|
|
|
|
publish_linux_arm64:
|
2017-09-02 17:07:20 +00:00
|
|
|
image: plugins/docker:17.05
|
|
|
|
pull: true
|
2016-07-31 17:06:39 +00:00
|
|
|
repo: plugins/s3-sync
|
2017-08-28 21:31:49 +00:00
|
|
|
tags: [ linux-arm64 ]
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
dockerfile: Dockerfile.arm64
|
2016-01-18 21:32:57 +00:00
|
|
|
when:
|
|
|
|
branch: master
|
2016-05-13 06:54:07 +00:00
|
|
|
event: push
|
2015-10-16 20:09:45 +00:00
|
|
|
|
2017-08-28 21:31:49 +00:00
|
|
|
publish_linux_arm:
|
2017-09-02 17:07:20 +00:00
|
|
|
image: plugins/docker:17.05
|
|
|
|
pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
repo: plugins/s3-sync
|
|
|
|
tags: [ linux-arm ]
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
dockerfile: Dockerfile.arm
|
|
|
|
when:
|
|
|
|
branch: master
|
|
|
|
event: push
|
|
|
|
|
|
|
|
# publish_windows_amd64:
|
2017-09-02 17:07:20 +00:00
|
|
|
# image: plugins/docker:17.05
|
|
|
|
# pull: true
|
2017-08-28 21:31:49 +00:00
|
|
|
# repo: plugins/s3-sync
|
|
|
|
# tags: [ windows-amd64 ]
|
|
|
|
# secrets: [ docker_username, docker_password ]
|
|
|
|
# dockerfile: Dockerfile.windows
|
|
|
|
# when:
|
|
|
|
# branch: master
|
|
|
|
# event: push
|
|
|
|
|
2017-09-02 17:07:20 +00:00
|
|
|
microbadger:
|
|
|
|
image: plugins/webhook:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ webhook_url ]
|
|
|
|
when:
|
|
|
|
branch: master
|
|
|
|
event: push
|
|
|
|
status: [ success ]
|