ALFRED/.drone.yml

30 lines
794 B
YAML
Raw Normal View History

2018-07-23 15:04:06 +00:00
pipeline:
build:
image: golang
commands:
2018-07-23 15:26:15 +00:00
- go get -v -d ./...
2018-07-23 15:04:06 +00:00
- go build .
2018-07-23 15:52:29 +00:00
test:
image: golang
secrets: [ test_api_token ]
environment: [ test_api_token ]
commands:
- go get -v -d ./...
- go test ./...
2018-07-23 15:04:06 +00:00
publish:
image: plugins/docker
repo: klmp200/alfred
secrets: [ docker_username, docker_password ]
when:
branch: master
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:
branch: master