At this time, the only way to share data between steps is by writing to disk. Write the data to disk in one step, and read the data from disk in the next step.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
starcalc 2022-06-07 22:37:40 +02:00
parent 7c69893a2b
commit ef98ba8547
1 changed files with 3 additions and 3 deletions

View File

@ -6,8 +6,8 @@ steps:
- name: prereq
image: cburki/mosquitto-clients
commands:
- echo mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1
- lastknownip=$(mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1)
# - echo mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1
- mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1 | tr -d '\n' >/tmp/lastknownip
environment:
hostname:
from_secret: hostname
@ -18,7 +18,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
- echo $lastknownip
- lastknownip=$(cat /tmp/lastknownip)
- sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini
- cat data/homie/config.json
- cat platformio.ini