curlimages/curl runs as non-root user 'curl' which can't write
the apk database. Plain alpine:3.20 boots as root, lets us
apk add bash + jq + curl in one line.
PCB projects already check out kicad-ci as a .gitlab submodule
(GIT_SUBMODULE_STRATEGY: recursive). Using the local path keeps
the script version pinned to the submodule pointer + removes the
need for the kicad9 ref hardcoded in the curl URL.
Replaces the `inventree_dev` + `inventree_main` jobs with
`astable_dev` + `astable_main` calling `POST /api/v1/bom/upload`
on the Astable instance. The old hfsntree path is removed —
Astable is now the source of truth for BOMs, and owns the
supplier-API credentials (Digi-Key / Mouser / etc.) so the CI
runner doesn't need them any more.
Revision targeting matches the previous convention:
- dev branch: uploads to the DRAFT "dev" rev
- main branch: uploads to the rev named from commit message,
promoted to ACTIVE
- MR-to-main: uploads to dev (matches old hfsntree behaviour)
Strict mode: any MPN that can't be resolved against an enabled
supplier integration aborts the whole upload — no orphan parts
get created when a CSV ships with typos.
Files uploaded alongside the BOM CSV (each optional, skipped
when absent so dev and main share the same template):
gerbers, panel gerbers, STEP, schematic PDF, PCB layout PDF,
iBOM HTML, BOM xlsx, PCBA + bare-PCB renders, DRC + ERC
reports, CPL CSV.
Astable attaches each file to the PCBA part, the bare PCB part,
or both (per fab-file dispatch table). Files attached to both
parts dedupe storage via content-addressed paths.
Required CI variables (set group-level on
Micromelon/education/hardware/, masked + protected):
ASTABLE_URL e.g. https://astable.timhadwen.com
ASTABLE_API_TOKEN minted at /manage/api-tokens (ast_…)
scripts/upload-bom.sh vendored from the Astable repo
(scripts/ci/upload-bom.sh) — the .astable_base before_script
curls a copy from this repo's raw URL at job time so the include:
project: pattern stays self-contained.
Downstream `upload_packages` needs: updated from inventree_main
→ astable_main.
- Add group_fields: [Value, Footprint, mpn] to all BOM outputs to prevent
components with different MPNs from being merged into one row
- Add deactivate-old step to inventree_main release pipeline
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added 'name' text variable to pcb_main, sch, mech, pos kibot configs
- Removed main_rules restriction from generate_gerbers, generate_position, generate_panel
- Updated inventree_dev to depend on gerbers, position, panel jobs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- dev branch: always VERSION="dev"
- main branch: extract version from commit message (e.g., "V1.2")
- Add KIBOT_VAR_name to all kibot script sections
- Add asset link to release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates ${PROJECT_NAME}_${VERSION}.zip containing all gerbers,
BOMs, images, placement files, 3D models, etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated sch, mech, pcb_main, and pos configs to properly check
for KIBOT_VAR_rev before falling back to git describe.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reverts to version with:
- Origin marks (copper squares + silkscreen circles)
- Proper JSON parsing with .get() defaults
- JSON-based scriptarg format
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Dev branch commits: upload to "dev" revision (was dry-run)
- MRs targeting main: upload to "dev" revision (was actual version)
- Actual main commits: upload to versioned revision
This allows pre-ordering parts during development while preventing
accidental version uploads until code is actually merged.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pipeline stages:
- preflight: extract_version, run_erc, run_drc
- fabrication: schematic, BOM, 3D, gerbers, position, panel
- inventree: dry-run on dev, full upload on main
- release: package upload and GitLab release
Features:
- Version extraction from MR title (V1.0, V1.1, etc.)
- Version injection into KiBot outputs
- Samsung P&P file generation
- Panel gerber generation
Usage: Include this file in project CI and set PROJECT_NAME variable.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- rev/rev_pcb: Use KIBOT_VAR_rev if set, else git describe
- name: Use KIBOT_VAR_name if set, else extract from filename
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>