Test other image
continuous-integration/drone/push Build is failing Details

This commit is contained in:
starcalc 2022-06-22 21:28:45 +02:00
parent 309478a4c6
commit 06a9075440
1 changed files with 3 additions and 6 deletions

View File

@ -11,24 +11,21 @@ steps:
hostname:
from_secret: hostname
- name: build
image: python:3.10
image: eclipse/platformio
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
- lastknownip=$(cat lastknownip)
- sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini
- cat data/homie/config.json
- cat platformio.ini
- pip install -U platformio
# - pip install -U platformio
# Build image
- platformio run --environment d1_mini
# Build file system image
- platformio run --target buildfs --environment d1_mini
# Upload image with espota-gateway
- |
curl --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 -k --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
# TODO: Upload file system image with espota-gateway, if the device is available again (or leave it to espota-gateway to retry often enough)
#- platformio run --target upload --environment d1_mini
# (Build if necessary and) Upload Filesystem Image (here: OTA)