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.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
7c69893a2b
commit
ef98ba8547
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue