Jake Hillion
64ea6e3550
All checks were successful
continuous-integration/drone/push Build is passing
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: format
|
|
image: golang:1.15
|
|
commands:
|
|
- bash -c "gofmt -l . | wc -l | cmp -s <(echo 0) || (gofmt -l . && exit 1)"
|
|
|
|
- name: install
|
|
image: golang:1.15
|
|
environment:
|
|
GOPROXY: http://10.20.0.25:3142|direct
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
commands:
|
|
- go test -i ./...
|
|
|
|
- name: test
|
|
image: golang:1.15
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
commands:
|
|
- go test ./...
|
|
|
|
- name: build (debian)
|
|
image: golang:1.15-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
|
|
|
|
- name: upload
|
|
image: minio/mc
|
|
when:
|
|
event:
|
|
- push
|
|
environment:
|
|
ACCESS_KEY: 001f185da4dcda3000000000d
|
|
SECRET_KEY:
|
|
from_secret: s3_secret_key
|
|
commands:
|
|
- mc alias set s3 http://10.20.0.25:3900 $${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
|
|
|
|
volumes:
|
|
- name: cache
|
|
temp: { }
|
|
|
|
---
|
|
kind: signature
|
|
hmac: a25d1abe0f31592ed19ac1e114804fcef9b3e8a54f829714647127c220b38595
|
|
|
|
...
|