diff --git a/.drone.yml b/.drone.yml index a13de60..d2765f5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,10 @@ kind: pipeline type: docker name: default steps: +- name: prereq + image: cburki/mosquitto-clients + commands: + - lastknownip=$(mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1) - name: build image: python:3.10 commands: @@ -10,7 +14,7 @@ steps: - sed -i "s/WIFIPASS/$iotpwd/" data/homie/config.json - sed -i "s/HOSTNAME/$hostname/g" data/homie/config.json - sed -i "s/HOSTNAME/$hostname/g" data/homie/config.json - - lastknownip=$(mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1) + - echo $lastknownip - sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini - cat data/homie/config.json - cat platformio.ini