Repository navigation
CI: build the telemetry broker into releases from repository secrets - #84
Merged
Merged
Conversation
build-release passes MQTT_URL, MQTT_USER and MQTT_PASSWORD through pio-actions' new build-env secret (v1.9.0), and scripts/write_secrets.py writes them into lib/cube/secrets.h as escaped C strings before the build. Without MQTT_URL nothing is written and the firmware does not report, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests124/124 passed.
|
Static analysisNo defects found.
|
Firmware size+85.0 KB across 1 environment.
|
| Section | Base | Head | Δ |
|---|---|---|---|
.flash.text |
1.17 MB | 1.24 MB | +67.9 KB |
.ext_ram.dummy |
1.75 MB | 1.81 MB | +64.0 KB |
.flash_rodata_dummy |
1.19 MB | 1.25 MB | +64.0 KB |
.flash.rodata |
517.6 KB | 534.2 KB | +16.6 KB |
.dram0.dummy |
87.5 KB | 88.0 KB | +512 B |
.iram0.text |
102.4 KB | 102.9 KB | +488 B |
.dram0.bss |
37.8 KB | 37.9 KB | +184 B |
.iram0.text_end |
61 B | 85 B | +24 B |
.dram0.data |
23.8 KB | 23.8 KB | +16 B |
esp32-s3-devkitc-1 — 482 symbol(s) changed
| Symbol | Base | Head | Δ |
|---|---|---|---|
esp_mqtt_task |
0 B | 4.5 KB | +4.5 KB |
Telemetry::publishBoot() |
0 B | 2.8 KB | +2.8 KB |
Telemetry::publishCrash(bool) |
0 B | 2.8 KB | +2.8 KB |
Telemetry::scanInto(ArduinoJson::V743PB22::JsonArray, int) |
0 B | 2.1 KB | +2.1 KB |
esp_mqtt_set_config |
0 B | 2.0 KB | +2.0 KB |
_ZNK11ArduinoJson8V743PB226detail11VariantData6acceptINS1_14JsonSerializerINS1_6WriterI6StringvEEEEEENT_11result_typeERS9_PKNS1_15ResourceManagerE$isra$0 |
1.5 KB | 3.4 KB | +2.0 KB |
Telemetry::publishSettings() |
0 B | 1.9 KB | +1.9 KB |
ws_read |
0 B | 1.5 KB | +1.5 KB |
Telemetry::publishLocation() |
0 B | 1.5 KB | +1.5 KB |
tcp_connect |
638 B | 2.0 KB | +1.4 KB |
Telemetry::publishHealth() |
0 B | 1.4 KB | +1.4 KB |
Telemetry::publishNetwork() |
0 B | 1.3 KB | +1.3 KB |
Telemetry::publishUsage() |
0 B | 1.3 KB | +1.3 KB |
ws_connect |
0 B | 1.2 KB | +1.2 KB |
Telemetry::handleCommand(char const*, char const*, unsigned int) |
0 B | 1.2 KB | +1.2 KB |
| +467 more |
Baseline: 86a886a. Image size is firmware.bin against the smaller app partition slot. RAM is static allocation only — the linker cannot see heap or stack.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release builds get the MQTT broker settings from repository secrets, so cubes running CI-built firmware report telemetry and accept settings (#83).
build-release.yml: passesMQTT_URL,MQTT_USERandMQTT_PASSWORDthrough pio-actions' newbuild-envsecret (v1.9.0;@v1already points to it). Each value is masked in the logs, andpre-build-runcalls the new script.scripts/write_secrets.py: writeslib/cube/secrets.hwith the values escaped as C string literals, so any password is safe. WithoutMQTT_URLit writes nothing and the firmware doesn't report, which is exactly today's behaviour. I checked a password containing a quote and a backslash: the header compiles.CLAUDE.md's CI section describes it.Before this does anything: add the three repository secrets (Settings → Secrets and variables → Actions). Until then this PR's own build runs without them.
Note: compiled-in values can be read from any release. The broker's ACL (README, Telemetry) is what limits the shared login, and I probed it: another client ID can't read a cube's topics or send it commands.
🤖 Generated with Claude Code