wiki/.drone.yml

48 lines
966 B
YAML
Raw Normal View History

2019-03-16 19:25:18 +00:00
kind: pipeline
name: default
2019-02-05 20:28:37 +00:00
2019-03-16 19:33:40 +00:00
workspace:
base: /go
path: src/p83.nl/go/wiki
2019-03-16 19:25:18 +00:00
steps:
- name: testing
2019-03-16 19:50:42 +00:00
image: golang:1.12-alpine
2019-03-16 19:25:18 +00:00
commands:
2019-03-16 19:35:34 +00:00
- export GOPATH=/go
2019-03-16 19:53:12 +00:00
- export CGO_ENABLED=0
2019-03-16 19:52:05 +00:00
- apk --no-cache add git
2019-03-16 19:37:37 +00:00
- go get -d -t ./...
2019-03-16 19:35:34 +00:00
- go build ./...
2019-03-16 19:25:18 +00:00
- go test ./...
- name: publish
image: plugins/docker
settings:
repo: registry.stuifzandapp.com/wiki
registry: registry.stuifzandapp.com
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: deploy
image: appleboy/drone-ssh
settings:
host: wiki.p83.nl
username: wiki
ssh_key:
from_secret: ssh_key
script:
- cd /home/wiki/wiki
- docker-compose pull web
- docker-compose up -d
- name: notify
image: plugins/webhook
settings:
debug: true
secrets:
- source: result_webhook
target: plugin_urls