Files
plugin-drone-pypi/.drone.yml
T
2018-12-17 11:10:58 +01:00

61 lines
1.4 KiB
YAML

workspace:
base: /go
path: src/github.com/drone-plugins/drone-pypi
pipeline:
test:
image: golang:1.10
pull: true
commands:
- go vet ./...
- go test -cover ./...
- rm -rf dist
- rm -rf drone_pypi_test.egg-info
environment:
- PLUGIN_REPOSITORY=https://test.pypi.org/legacy/
- PLUGIN_DISTRIBUTIONS=sdist
build_linux_amd64:
image: golang:1.10
pull: true
group: build
environment:
- GOOS=linux
- GOARCH=amd64
- CGO_ENABLED=0
commands:
- |
if test "${DRONE_TAG}" = ""; then
go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-pypi
else
go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-pypi
fi
publish_linux_amd64:
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
group: docker
repo: plugins/pypi
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: Dockerfile
when:
event: [ push, tag ]
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 ]
microbadger:
image: plugins/webhook:1
pull: true
secrets: [ webhook_url ]
when: