ekster/.drone.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2019-03-19 21:23:10 +00:00
kind: pipeline
name: default
2018-02-16 21:13:01 +00:00
2019-03-19 21:23:10 +00:00
workspace:
base: /go
path: src/p83.nl/go/ekster
2019-01-12 15:42:29 +00:00
2019-03-19 21:23:10 +00:00
steps:
- name: testing
image: golang:1.12-alpine
commands:
- export GOPATH=/go
2019-08-06 20:37:23 +00:00
- export CGO_ENABLED=0 GOOS=linux GOARCH=amd64
2019-03-19 21:23:10 +00:00
- apk --no-cache add git
- go get -d -t ./...
2019-08-06 20:21:52 +00:00
- go build ./...
2019-03-19 21:23:10 +00:00
- go test ./...
2019-07-23 18:34:51 +00:00
- name: publish-personal
2019-03-19 21:23:10 +00:00
image: plugins/docker
settings:
repo: registry.stuifzandapp.com/microsub-server
registry: registry.stuifzandapp.com
username:
from_secret: docker_username
password:
from_secret: docker_password
2019-07-23 19:24:36 +00:00
# - name: publish-docker
# image: plugins/docker
# settings:
# repo: pstuifzand/ekster
# tags:
# - alpine
# dockerfile: Dockerfile.alpine
# username:
# from_secret: docker_official_username
# password:
# from_secret: docker_official_password
2019-07-23 18:34:51 +00:00
2019-03-19 21:23:10 +00:00
- name: deploy
image: appleboy/drone-ssh
settings:
host: microsub.stuifzandapp.com
username: microsub
ssh_key:
from_secret: ssh_key
script:
- cd /home/microsub/microsub
- docker-compose pull web
- docker-compose up -d