2021-11-20 19:57:49 +00:00
|
|
|
---
|
2019-03-19 21:23:10 +00:00
|
|
|
kind: pipeline
|
2021-10-20 20:06:59 +00:00
|
|
|
type: docker
|
2021-11-20 19:57:49 +00:00
|
|
|
name: build
|
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
|
2021-05-30 20:07:20 +00:00
|
|
|
image: golang:1.16-alpine
|
2019-08-06 22:07:45 +00:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GOOS: linux
|
|
|
|
GOARCH: amd64
|
2019-03-19 21:23:10 +00:00
|
|
|
commands:
|
|
|
|
- apk --no-cache add git
|
|
|
|
- go get -d -t ./...
|
2021-11-20 19:57:49 +00:00
|
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
2019-08-06 22:29:03 +00:00
|
|
|
- go build p83.nl/go/ekster/cmd/eksterd
|
2021-11-20 19:57:49 +00:00
|
|
|
- go vet ./...
|
|
|
|
- go test -v ./...
|
|
|
|
- staticcheck ./...
|
2019-03-19 21:23:10 +00:00
|
|
|
|
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
|
2021-11-20 20:47:07 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|
2019-03-19 21:23:10 +00:00
|
|
|
|
2021-10-30 23:38:17 +00:00
|
|
|
# - name: publish-docker
|
|
|
|
# image: plugins/docker
|
|
|
|
# depends_on:
|
|
|
|
# - testing
|
|
|
|
# settings:
|
|
|
|
# repo: pstuifzand/ekster
|
|
|
|
# tags:
|
|
|
|
# - 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
|
2021-10-20 20:06:59 +00:00
|
|
|
depends_on:
|
|
|
|
- publish-personal
|
2019-03-19 21:23:10 +00:00
|
|
|
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
|
2021-11-20 20:47:07 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|