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