Modify build
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nicolas Duhamel 2022-02-07 16:14:55 +01:00
parent 9f509759cc
commit 5f1d6888f0

View File

@ -2,6 +2,11 @@ kind: pipeline
type: docker
name: default
volumes:
- name: build
host:
path: /home/citadel/build/
steps:
- name: Build
image: python:3.9
@ -12,34 +17,12 @@ steps:
- pip install .
- pex ./ -m yamaha2mqtt -o yamaha2mqtt.pex
- name: Deploy
image: appleboy/drone-scp
settings:
host:
- gavarni.jombi.fr
user: citadel
# ssh-key:
# from_secret: ssh_key
password:
from_secret: ssh_password
port: 22
command_timeout: 2m
target: /home/citadel
source:
- ./yamaha2mqtt.pex
strip_components: 1
- name: ssh commands
image: appleboy/drone-ssh
settings:
host: gavarni.jombi.fr
username: citadel
port: 22
# key:
# from_secret: ssh_key
password:
from_secret: ssh_password
script:
- mv yamaha2mqtt.pex ./services/bin/yamaha2mqtt
- systemctl --user restart citadel@yamaha2mqtt
image: python:3.9
volumes:
- name: build
path: /build
commands:
- cp ./yamaha2mqtt.pex /build/yamaha2mqtt
when:
branch:
- master