From 41f55451d43d17a9f62f33dead92d486d19e9770 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Tue, 6 Sep 2022 19:24:36 -0700 Subject: [PATCH] update .drone.yml to new format --- .drone.yml | 117 +++++++++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/.drone.yml b/.drone.yml index a68e618..26e3d7e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,14 +1,14 @@ -workspace: - base: /go - path: src/cwtch.im/cwtch +--- +kind: pipeline +type: docker +name: linux-test -pipeline: - fetch: - image: golang - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] +steps: + - name: fetch + image: golang:1.17.5 + volumes: + - name: deps + path: /go commands: - go install honnef.co/go/tools/cmd/staticcheck@latest - wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor @@ -17,56 +17,69 @@ pipeline: - go get -u golang.org/x/lint/golint - export GO111MODULE=on - go mod vendor - quality: - image: golang - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] + - name: quality + image: golang:1.17.5 + volumes: + - name: deps + path: /go commands: - staticcheck ./... - units-tests: - image: golang - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] + - name: units-tests + image: golang:1.17.5 + volumes: + - name: deps + path: /go commands: - - export PATH=$PATH:/go/src/cwtch.im/cwtch + - export PATH=`pwd`:$PATH - sh testing/tests.sh - integ-test: - image: golang - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] + - name: integ-test + image: golang:1.17.5 + volumes: + - name: deps + path: /go commands: + - export PATH=`pwd`:$PATH - go test -race -v cwtch.im/cwtch/testing/ - filesharing-integ-test: - image: golang - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] + - name: filesharing-integ-test + image: golang:1.17.5 + volumes: + - name: deps + path: /go commands: + - export PATH=`pwd`:$PATH - go test -race -v cwtch.im/cwtch/testing/filesharing - notify-email: - image: drillster/drone-email - host: build.openprivacy.ca - port: 25 - skip_verify: true - from: drone@openprivacy.ca - when: - repo: cwtch.im/cwtch - branch: master - event: [ push, pull_request ] - status: [ failure ] - notify-gogs: - image: openpriv/drone-gogs + - name: notify-email + image: drillster/drone-email + pull: if-not-exists + host: build.openprivacy.ca + port: 25 + skip_verify: true + from: drone@openprivacy.ca + when: + event: [ push, pull_request ] + status: [ failure ] + - name: notify-gogs + image: openpriv/drone-gogs + pull: if-not-exists when: - repo: cwtch.im/cwtch - branch: master event: pull_request status: [ success, changed, failure ] - secrets: [gogs_account_token] - gogs_url: https://git.openprivacy.ca + 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/cwtch + branch: master + event: + - push + - pull_request + - tag