All checks were successful
continuous-integration/drone/push Build is passing
48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
kind: pipeline
|
|
name: default
|
|
|
|
workspace:
|
|
base: /go
|
|
path: src/p83.nl/go/websub-hub
|
|
|
|
steps:
|
|
- name: testing
|
|
image: golang:1.12-alpine
|
|
commands:
|
|
- export GOPATH=/go
|
|
- export CGO_ENABLED=0
|
|
- apk --no-cache add git
|
|
- go get -d -t ./...
|
|
- go build p83.nl/go/websub-hub/cmd/hubserver
|
|
- go test ./...
|
|
|
|
- name: publish
|
|
image: plugins/docker
|
|
settings:
|
|
repo: registry.stuifzandapp.com/websub-hub
|
|
registry: registry.stuifzandapp.com
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
|
|
- name: deploy
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: hub.stuifzandapp.com
|
|
username: hub
|
|
ssh_key:
|
|
from_secret: ssh_key
|
|
script:
|
|
- cd /home/hub/hub
|
|
- docker-compose pull hub
|
|
- docker-compose up -d
|
|
|
|
# - name: notify
|
|
# image: plugins/webhook
|
|
# settings:
|
|
# debug: true
|
|
# secrets:
|
|
# - source: result_webhook
|
|
# target: plugin_urls
|