dissertation-2-code/.drone.yml

65 lines
1.4 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
image: golang:1.15
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
image: golang:1.15
2020-10-30 22:48:30 +00:00
environment:
GOPROXY: http://10.20.0.25: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
image: golang:1.15
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)
image: golang:1.15-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-01-20 13:43:38 +00:00
- GOOS=linux GOARCH=amd64 go build -o linux_amd64
2021-01-20 13:45:17 +00:00
- GOOS=linux GOARCH=arm64 GOARM=7 go build -o linux_arm64_v7
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:
- mc alias set s3 http://10.20.0.25:3900 $${ACCESS_KEY} $${SECRET_KEY}
2021-01-20 13:54:25 +00:00
- mc cp linux_amd64 s3/dissertation/binaries/debian/${DRONE_BRANCH}_linux_amd64
- mc cp linux_arm64_v7 s3/dissertation/binaries/debian/${DRONE_BRANCH}_linux_arm64_v7
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
2020-12-21 14:43:15 +00:00
hmac: 8c21312bcfbaa9b7d2d3c31b1a5c13b54b4ecd1da853aa66a8ed11d72154fcca
2020-12-21 14:42:36 +00:00
...