diff --git a/.drone.yml b/.drone.yml index d1b6df6..f8fd8da 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,19 +6,27 @@ steps: - name: Build image: python commands: + - echo $PASSWORD + - echo PASSWORD + - echo ${PASSWORD} - apt-get update - - apt-get -y install python-systemd python3-systemd libsystemd-dev + - apt-get -y install python3-systemd libsystemd-dev - pip install pex - pip install . - pex ./ -m yamaha2mqtt -o yamaha2mqtt.pex + environment: + PASSWORD: + from_secret: ssh_key - name: Deploy image: appleboy/drone-scp settings: host: - gavarni.jombi.fr user: citadel - key: - from_secret: ssh_key + # ssh-key: + # from_secret: ssh_key + password: + from_secret: ssh_password port: 22 command_timeout: 2m target: /home/citadel @@ -31,8 +39,10 @@ steps: host: gavarni.jombi.fr username: citadel port: 22 - key: - from_secret: ssh_key + # key: + # from_secret: ssh_key + password: + from_secret: ssh_password script: - mv yamaha2mqtt.pex ./services/bin/yamaha2mqtt - systemctl --user restart citadel@yamaha2mqtt diff --git a/src/yamaha2mqtt/app.py b/src/yamaha2mqtt/app.py index ee54e49..ce0a387 100644 --- a/src/yamaha2mqtt/app.py +++ b/src/yamaha2mqtt/app.py @@ -41,7 +41,7 @@ class Yamaha: for action in senario.deactivate: self.request(action) - @retry(stop=stop_after_attempt(3), wait=wait_fixed(1), reraise=True) + @retry(stop=stop_after_attempt(3), wait=wait_fixed(2), reraise=True) def request(self, request): try: r = self._device.request(request)