This commit is contained in:
parent
ec510484d8
commit
f53c832859
65
.drone.yml
65
.drone.yml
|
@ -1,22 +1,47 @@
|
||||||
pipeline:
|
kind: pipeline
|
||||||
build:
|
name: default
|
||||||
image: golang
|
|
||||||
commands:
|
|
||||||
- go get p83.nl/go/websub-hub/cmd/hubserver
|
|
||||||
- go build p83.nl/go/websub-hub/cmd/hubserver
|
|
||||||
|
|
||||||
publish:
|
workspace:
|
||||||
image: plugins/docker
|
base: /go
|
||||||
repo: registry.stuifzandapp.com/websub-hub
|
path: src/p83.nl/go/websub-hub
|
||||||
registry: registry.stuifzandapp.com
|
|
||||||
secrets: [ docker_username, docker_password ]
|
|
||||||
|
|
||||||
deploy:
|
steps:
|
||||||
image: appleboy/drone-ssh
|
- name: testing
|
||||||
host: hub.stuifzandapp.com
|
image: golang:1.12-alpine
|
||||||
username: hub
|
commands:
|
||||||
secrets: ['ssh_key']
|
- export GOPATH=/go
|
||||||
script:
|
- export CGO_ENABLED=0
|
||||||
- cd /home/hub/hub
|
- apk --no-cache add git
|
||||||
- docker-compose pull
|
- go get -d -t ./...
|
||||||
- docker-compose up -d
|
- go build ./...
|
||||||
|
- 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 web
|
||||||
|
- docker-compose up -d
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: plugins/webhook
|
||||||
|
settings:
|
||||||
|
debug: true
|
||||||
|
secrets:
|
||||||
|
- source: result_webhook
|
||||||
|
target: plugin_urls
|
||||||
|
|
Loading…
Reference in New Issue
Block a user