2021-11-08 17:47:29 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: linux-test
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go get -u golang.org/x/lint/golint
|
|
|
|
- git fetch --tags
|
|
|
|
- go get
|
|
|
|
- echo `git describe --tags` > VERSION
|
|
|
|
- echo `date +%G-%m-%d-%H-%M` > BUILDDATE
|
|
|
|
|
|
|
|
- name: quality
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go list ./... | xargs go vet
|
|
|
|
- go list ./... | xargs golint -set_exit_status
|
|
|
|
|
|
|
|
- name: units-tests
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- sh testing/tests.sh
|
|
|
|
|
|
|
|
- name: test-builda-app
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- cd app
|
|
|
|
- go build
|
|
|
|
|
|
|
|
- name: notify-email
|
|
|
|
image: drillster/drone-email
|
|
|
|
settings:
|
|
|
|
host: build.openprivacy.ca
|
|
|
|
port: 25
|
|
|
|
skip_verify: true
|
|
|
|
from: drone@openprivacy.ca
|
|
|
|
when:
|
|
|
|
status: [failure]
|
|
|
|
|
|
|
|
- name: notify-gogs
|
|
|
|
image: openpriv/drone-gogs
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
status: [success, changed, failure]
|
|
|
|
environment:
|
|
|
|
GOGS_ACCOUNT_TOKEN:
|
|
|
|
from_secret: gogs_account_token
|
|
|
|
settings:
|
|
|
|
gogs_url: https://git.openprivacy.ca
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# gopath where bin and pkg lives to persist across steps
|
|
|
|
- name: deps
|
|
|
|
temp: {}
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
repo: cwtch.im/server
|
|
|
|
branch: trunk
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
2021-11-08 18:29:59 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: windows-test
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: windows
|
|
|
|
version: 1809
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: C:\godeps
|
|
|
|
environment:
|
|
|
|
GOPATH: C:\godeps
|
|
|
|
commands:
|
|
|
|
- go get
|
|
|
|
|
|
|
|
- name: units-tests
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: C:\godeps
|
|
|
|
environment:
|
|
|
|
GOPATH: C:\godeps
|
|
|
|
commands:
|
|
|
|
- go test -race ${1} -v ./metrics
|
|
|
|
- go test -race ${1} -v ./storage
|
|
|
|
- go test -race ${1} -v ./
|
|
|
|
|
|
|
|
- name: test-builda-app
|
|
|
|
image: golang
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: C:\godeps
|
|
|
|
environment:
|
|
|
|
GOPATH: C:\godeps
|
|
|
|
commands:
|
|
|
|
- cd app
|
|
|
|
- go build
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# gopath where bin and pkg lives to persist across steps
|
|
|
|
- name: deps
|
|
|
|
temp: {}
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
repo: cwtch.im/server
|
|
|
|
branch: trunk
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: exec
|
|
|
|
name: mac-test
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: darwin
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
environment:
|
|
|
|
PATH: PATH=$PATH:/usr/local/go/bin/
|
|
|
|
commands:
|
|
|
|
- go get -u golang.org/x/lint/golint
|
|
|
|
- go get
|
|
|
|
|
|
|
|
- name: units-tests
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
environment:
|
|
|
|
PATH: PATH=$PATH:/usr/local/go/bin/
|
|
|
|
commands:
|
|
|
|
- sh testing/tests.sh
|
|
|
|
|
|
|
|
- name: test-builda-app
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
environment:
|
|
|
|
PATH: PATH=$PATH:/usr/local/go/bin/
|
|
|
|
commands:
|
|
|
|
- cd app
|
|
|
|
- go build
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# gopath where bin and pkg lives to persist across steps
|
|
|
|
- name: deps
|
|
|
|
temp: {}
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
repo: cwtch.im/server
|
|
|
|
branch: trunk
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
|