2018-07-23 17:04:06 +02:00
|
|
|
pipeline:
|
|
|
|
build:
|
2019-01-04 11:16:04 +01:00
|
|
|
image: golang:1.11
|
2018-07-23 19:26:46 +02:00
|
|
|
group: build
|
2018-07-23 17:04:06 +02:00
|
|
|
commands:
|
2018-07-23 17:26:15 +02:00
|
|
|
- go get -v -d ./...
|
2018-07-23 17:04:06 +02:00
|
|
|
- go build .
|
2018-07-23 17:52:29 +02:00
|
|
|
test:
|
2019-01-04 11:16:04 +01:00
|
|
|
image: golang:1.11
|
|
|
|
group: test
|
2018-07-23 17:52:29 +02:00
|
|
|
secrets: [ test_api_token ]
|
|
|
|
environment: [ test_api_token ]
|
|
|
|
commands:
|
2018-07-23 19:26:46 +02:00
|
|
|
- go get -v -d ./...
|
2018-07-23 17:52:29 +02:00
|
|
|
- go test ./...
|
2018-07-23 17:04:06 +02:00
|
|
|
publish:
|
|
|
|
image: plugins/docker
|
|
|
|
repo: klmp200/alfred
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
when:
|
|
|
|
branch: master
|
2018-07-24 02:49:26 +02:00
|
|
|
event: push
|
2018-07-23 17:04:06 +02:00
|
|
|
deploy:
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
host:
|
|
|
|
- ollivander.diagon-alley
|
|
|
|
username: dronedeploy
|
|
|
|
secrets: [ ssh_password ]
|
|
|
|
envs: [ ssh_password ]
|
|
|
|
script:
|
|
|
|
- echo $SSH_PASSWORD | sudo -S systemctl restart alfred-bot
|
|
|
|
when:
|
2018-07-24 02:49:26 +02:00
|
|
|
branch: master
|
|
|
|
event: push
|