From 750cbdf443898a00c50551bf0e7dddd73ed5922d Mon Sep 17 00:00:00 2001 From: starcalc Date: Wed, 22 Jun 2022 22:25:17 +0200 Subject: [PATCH] Old (working) image, new seperate step "upload" --- .drone.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1217383..711bb5b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,20 +11,24 @@ steps: hostname: from_secret: hostname - name: build - image: eclipse/platformio + image: python:3.10 commands: - - sudo chmod -R a+rwx . - - platformio --version - 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) - # - pip install -U platformio + - sed -i "s/HOSTNAME/$lastknownip/g" platformio.ini + - cat data/homie/config.json + - cat platformio.ini + - pip install -U platformio # Build image - platformio run --environment d1_mini # Build file system image - platformio run --target buildfs --environment d1_mini +- name: upload + image: python:3.10 + commands: # Upload image with espota-gateway - | 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