change HOSTNAME to HOSt
continuous-integration/drone/push Build was killed Details

This commit is contained in:
starcalc 2022-08-30 18:07:19 +02:00
parent 9a4730e2d1
commit 111f7aa6e1
1 changed files with 6 additions and 6 deletions

View File

@ -7,17 +7,17 @@ steps:
- name: fetch ip
image: cburki/mosquitto-clients
commands:
- echo "Hostname is ---${HOSTNAME}--- $HOSTNAME ... \$HOSTNAME ... \${HOSTNAME} +++ $\{HOSTNAME\}"
- mosquitto_sub -h raum.ctdo.de -t "homie/${HOSTNAME}/\$localip" -C 1 | tr -d '\n'
- mosquitto_sub -h raum.ctdo.de -t "homie/${HOSTNAME}/\$localip" -C 1 | tr -d '\n' >lastknownip
- echo "Hostname is ---${HOST}--- $HOST ... \$HOST ... \${HOST} +++ $\{HOST\}"
- mosquitto_sub -h raum.ctdo.de -t "homie/${HOST}/\$localip" -C 1 | tr -d '\n'
- mosquitto_sub -h raum.ctdo.de -t "homie/${HOST}/\$localip" -C 1 | tr -d '\n' >lastknownip
- cat "lastknownip"
- name: configure
image: alpine
commands:
- sed -i "s/WIFISSID/$IOTSSID/" data/homie/config.json
- 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
- sed -i "s/HOSTNAME/${HOST}/g" data/homie/config.json
- sed -i "s/HOSTNAME/${HOST}/g" data/homie/config.json
- lastknownip=$(cat lastknownip)
- sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini
environment:
@ -51,6 +51,6 @@ steps:
matrix:
include:
HOSTNAME:
HOST:
- blinky1
- blinky2