dissertation-2-code/.drone.yml

69 lines
1.7 KiB
YAML
Raw Normal View History

2020-12-21 14:42:36 +00:00
---
2020-10-25 22:05:35 +00:00
kind: pipeline
type: docker
name: default
steps:
2020-12-21 14:38:18 +00:00
- name: format
2021-03-20 12:37:49 +00:00
image: golang:1.16
2020-12-21 14:38:18 +00:00
commands:
- bash -c "gofmt -l . | wc -l | cmp -s <(echo 0) || (gofmt -l . && exit 1)"
2020-10-25 22:05:35 +00:00
- name: install
2021-03-20 12:37:49 +00:00
image: golang:1.16
2020-10-30 22:48:30 +00:00
environment:
2021-03-20 12:36:18 +00:00
GOPROXY: http://containers.internal.hillion.co.uk:3142,direct
2020-10-25 22:05:35 +00:00
volumes:
- name: cache
path: /go
commands:
2020-10-25 22:06:33 +00:00
- go test -i ./...
2020-10-25 22:05:35 +00:00
- name: test
2021-03-20 12:37:49 +00:00
image: golang:1.16
2020-10-25 22:05:35 +00:00
volumes:
- name: cache
path: /go
commands:
2020-10-25 22:06:33 +00:00
- go test ./...
2020-10-25 22:05:35 +00:00
2020-11-04 20:23:44 +00:00
- name: build (debian)
2021-03-20 12:37:49 +00:00
image: golang:1.16-buster
2020-11-04 20:26:38 +00:00
when:
event:
- push
2020-11-04 20:23:44 +00:00
volumes:
- name: cache
path: /go
commands:
2021-03-20 13:38:12 +00:00
- GOOS=linux GOARCH=amd64 go build -o linux_amd64
- GOOS=linux GOARCH=arm GOARM=7 go build -o linux_arm_v7
2021-03-27 17:23:03 +00:00
- GOOS=freebsd GOARCH=amd64 go build -o freebsd_amd64
2021-03-20 13:39:42 +00:00
- GOOS=freebsd GOARCH=arm64 go build -o freebsd_arm64_v8a
2020-11-04 20:23:44 +00:00
- name: upload
image: minio/mc
when:
event:
- push
environment:
ACCESS_KEY: 001f185da4dcda3000000000d
SECRET_KEY:
from_secret: s3_secret_key
commands:
2021-03-20 12:39:18 +00:00
- mc alias set s3 https://s3.us-west-001.backblazeb2.com $${ACCESS_KEY} $${SECRET_KEY}
2021-03-27 17:24:12 +00:00
- 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
2020-11-04 20:23:44 +00:00
2020-10-25 22:05:35 +00:00
volumes:
- name: cache
2020-12-21 14:38:18 +00:00
temp: { }
2020-12-21 14:42:36 +00:00
---
kind: signature
2021-03-27 17:26:56 +00:00
hmac: 7960420c7d02f9bce56d6429b612676d24cbe1d1608cf44a77da9afc411eccb8
2020-12-21 14:42:36 +00:00
...