Tim Hadwen bd7882f54f Switch CI BOM upload from InvenTree (hfsntree) to Astable
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.
2026-05-24 09:54:02 +00:00
2025-02-17 04:53:56 +00:00
2025-01-16 07:12:50 +00:00
2025-09-07 19:03:41 +10:00
2022-12-19 10:53:38 +00:00
2025-01-16 07:12:50 +00:00
2025-01-16 07:12:50 +00:00
2022-11-23 22:42:37 +10:00
2025-01-16 07:12:50 +00:00
2022-11-23 22:42:37 +10:00

Dependencies

Setup

  1. From an empty directory: kimelon config --init --remote <REMOTE_URL>; if git is already setup and pointing to the remote then drop --remote
  2. Create a kicad project, based off of a template found in this directory
  3. Lock the file you want to edit, see Locking
  4. Start editing

Updating

kimelon config

Locking

All kicad files are read-only by default, the file will need to be locked to your ssh key/gitlab account for it to be writable. This can be done using kimelon lock <type> <filter>. See kimelon lock --help for more info. Once you are done editing the lock can be released using kimelon unlock <type> <filter>. See kimelon unlock --help for more info.

Lock/unlock can't be done if there are any branches apart from dev & main.

CI

The following will be produced on any commit to dev & main branches or any commit on branch that has an active MR with said branches:

  • DRC & ERC
  • Step files

The following will be produced only on commits to main or commits on dev if it has an active MR with main:

  • JLCPCB compatible gerbers
  • PDFs of Schematic & PCB
  • BOM

Panels

Kikit is used to generate panels by placing a json file in your kicad project root folder.

The templates in this repository all contain a default panel file with the following features:

  • single board
  • full frame, no tabs/gap between PCB and frame, vcuts
  • Mounting hole + fiducial in each corner

See examples of panel types/options here See syntax of json file here

Description
KiCad CI shared workflow + scripts (mirrored from gitlab.com/Micromelon/education/hardware/kicad-ci)
Readme 308 KiB
Languages
Python 85%
Shell 11.7%
HTML 3.3%