image build geändert
continuous-integration/drone/push Build is failing Details

This commit is contained in:
starcalc 2022-08-30 21:04:57 +02:00
parent 54b4592e5f
commit 96e8a08214
3 changed files with 18 additions and 6 deletions

View File

@ -18,8 +18,11 @@ steps:
- name: build
image: suculent/platformio-docker-build
commands:
# Build image
# Build images
- platformio run --environment d1_mini
- |
chmod u+x ./configurefs.sh
./configurefs.sh
- name: upload image
image: curlimages/curl
commands:
@ -35,12 +38,12 @@ steps:
# Upload file system image with espota-gateway, leave it to espota-gateway to retry often enough
#- |
# 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
- name: build configs
image: suculent/platformio-docker-build
- name: upload configs
image: curlimages/curl
commands:
- |
chmod u+x ./configureandupload.sh
./configureandupload.sh
chmod u+x ./uploadfs.sh
./uploadfs.sh
environment:
IOTSSID:
from_secret: iotssid

View File

@ -9,8 +9,10 @@ do
sed -i "s/HOSTNAME/${curhost}/g" data/homie/config.json
# Build image with these parameters
platformio run --target buildfs --environment d1_mini
# Save this image
cp .pio/build/d1_mini/spiffs.bin .pio/build/d1_mini/spiffs_${curhost}.bin
# Upload this image
curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$curip" --form spiffs=@.pio/build/d1_mini/spiffs.bin --no-buffer
# curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$curip" --form spiffs=@.pio/build/d1_mini/spiffs.bin --no-buffer
# Revert config.json
cp data/homie/config.json.sample data/homie/config.json
done < <(cat lastknownhostips)

7
uploadfs.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
while IFS="," read -r curhost curip
do
echo "Host ${curhost} and IP ${curip}"
# Upload this image
curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$curip" --form spiffs=@.pio/build/d1_mini/spiffs_${curhost}.bin --no-buffer
done < <(cat lastknownhostips)