dissertation-2-code/.drone.yml
Jake Hillion f69bb47966
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
signed dronefile
2021-03-27 17:26:56 +00:00

69 lines
1.7 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: format
image: golang:1.16
commands:
- bash -c "gofmt -l . | wc -l | cmp -s <(echo 0) || (gofmt -l . && exit 1)"
- name: install
image: golang:1.16
environment:
GOPROXY: http://containers.internal.hillion.co.uk:3142,direct
volumes:
- name: cache
path: /go
commands:
- go test -i ./...
- name: test
image: golang:1.16
volumes:
- name: cache
path: /go
commands:
- go test ./...
- name: build (debian)
image: golang:1.16-buster
when:
event:
- push
volumes:
- name: cache
path: /go
commands:
- GOOS=linux GOARCH=amd64 go build -o linux_amd64
- GOOS=linux GOARCH=arm GOARM=7 go build -o linux_arm_v7
- GOOS=freebsd GOARCH=amd64 go build -o freebsd_amd64
- GOOS=freebsd GOARCH=arm64 go build -o freebsd_arm64_v8a
- name: upload
image: minio/mc
when:
event:
- push
environment:
ACCESS_KEY: 001f185da4dcda3000000000d
SECRET_KEY:
from_secret: s3_secret_key
commands:
- mc alias set s3 https://s3.us-west-001.backblazeb2.com $${ACCESS_KEY} $${SECRET_KEY}
- mc cp linux_amd64 s3/dissertation/binaries/debian/${DRONE_BRANCH}_linux_amd64
- mc cp linux_arm_v7 s3/dissertation/binaries/debian/${DRONE_BRANCH}_linux_arm_v7
- mc cp freebsd_amd64 s3/dissertation/binaries/debian/${DRONE_BRANCH}_freebsd_amd64
- mc cp freebsd_arm64_v8a s3/dissertation/binaries/debian/${DRONE_BRANCH}_freebsd_arm64_v8a
volumes:
- name: cache
temp: { }
---
kind: signature
hmac: 7960420c7d02f9bce56d6429b612676d24cbe1d1608cf44a77da9afc411eccb8
...