Try to fix firmware deploy
This commit is contained in:
parent
e269418090
commit
388d22915b
10
.drone.yml
10
.drone.yml
|
@ -6,7 +6,10 @@ steps:
|
||||||
- name: fetch ip
|
- name: fetch ip
|
||||||
image: cburki/mosquitto-clients
|
image: cburki/mosquitto-clients
|
||||||
commands:
|
commands:
|
||||||
- mosquitto_sub -h mqtt.ctdo.de -t "homie/$hostname/\$localip" -C 1 | tr -d '\n' >lastknownip
|
- echo "$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
|
||||||
|
- cat "lastknownip"
|
||||||
environment:
|
environment:
|
||||||
hostname:
|
hostname:
|
||||||
from_secret: hostname
|
from_secret: hostname
|
||||||
|
@ -38,12 +41,13 @@ steps:
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
commands:
|
commands:
|
||||||
- lastknownip=$(cat lastknownip)
|
- lastknownip=$(cat lastknownip)
|
||||||
|
- echo "$lastknownip"
|
||||||
# Upload image with espota-gateway
|
# Upload image with espota-gateway
|
||||||
- |
|
- |
|
||||||
curl --insecure --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$lastknownip" --form firmware=@.pio/build/d1_mini/firmware.bin -N
|
curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$lastknownip" --form firmware=@.pio/build/d1_mini/firmware.bin --no-buffer
|
||||||
# TODO: Upload file system image with espota-gateway, if the device is available again (or leave it to espota-gateway to retry often enough)
|
# TODO: Upload file system image with espota-gateway, if the device is available again (or leave it to espota-gateway to retry often enough)
|
||||||
- |
|
- |
|
||||||
curl --insecure --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$lastknownip" --form spiffs=@.pio/build/d1_mini/spiffs.bin -N
|
curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$lastknownip" --form spiffs=@.pio/build/d1_mini/spiffs.bin --no-buffer
|
||||||
|
|
||||||
### matrix-builds? - for multiple volumeknobs?
|
### matrix-builds? - for multiple volumeknobs?
|
||||||
### https://0-8-0.docs.drone.io/matrix-builds/
|
### https://0-8-0.docs.drone.io/matrix-builds/
|
||||||
|
|
Loading…
Reference in New Issue