Commit Graph
37 Commits
Author SHA1 Message Date
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
Tim HadwenandClaude Opus 4.6 a9b5e1fa07 Add BOM group_fields for MPN and deactivate-old CI step
- 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>
2026-02-15 17:38:52 +10:00
Tim HadwenandClaude Opus 4.5 f54fb00f57 Add name text variable and enable panel jobs on dev
- 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>
2026-02-03 07:45:40 +10:00
Tim HadwenandClaude Opus 4.5 7abd4621a9 Fix YAML syntax in create_release job
Simplified release job - removed complex asset links that caused YAML error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 07:27:05 +10:00
Tim HadwenandClaude Opus 4.5 e5c5746b2c Fix version extraction: dev branch uses 'dev', main extracts from commit
- 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>
2026-02-03 07:12:57 +10:00
Tim HadwenandClaude Opus 4.5 3778a453e8 Simplify release to single zip with all fabrication outputs
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>
2026-02-02 22:22:53 +10:00
Tim HadwenandClaude Opus 4.5 6894ca56c7 Add KIBOT_VAR_name to fabrication jobs
Ensures part number text variable is set correctly on silkscreen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 22:16:06 +10:00
Tim HadwenandClaude Opus 4.5 366165ceb6 Fix version detection to use KIBOT_VAR_rev environment variable
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>
2026-02-01 22:59:45 +10:00
Tim HadwenandClaude Opus 4.5 5e3e00c8c1 Restore pre_panel.py with origin mark features
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>
2026-02-01 22:48:44 +10:00
Tim HadwenandClaude Opus 4.5 5ac89f2df3 Fix InvenTree uploads to use dev revision for MRs
- 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>
2026-02-01 22:30:23 +10:00
timmyhadwen 78fa1c0652 Simplify create_release to use native GitLab release keyword 2026-01-17 20:10:30 +10:00
timmyhadwen 9b4e101400 Fix upload_packages: Python one-liner to avoid YAML issues 2026-01-17 15:17:02 +10:00
timmyhadwen 2b717d1795 Fix YAML syntax for Python heredoc 2026-01-17 15:16:14 +10:00
timmyhadwen 0dc6ff725f Fix upload_packages: use Python urllib (no curl/wget in image) 2026-01-17 15:15:36 +10:00
timmyhadwen 1975291cea Fix upload_packages: use pre-installed curl 2026-01-17 14:58:16 +10:00
timmyhadwen e530a3768b Fix upload_packages: use wget instead of curl (dependency conflict) 2026-01-17 14:38:16 +10:00
timmyhadwenandClaude Opus 4.5 614b566d31 Add complete KiCad CI pipeline with hfsntree integration
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>
2026-01-17 10:23:05 +10:00
timmyhadwenandClaude Opus 4.5 1cae44ffdc Add env var fallback for KiBot text variables
- 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>
2026-01-16 23:24:13 +10:00
timmyhadwen 8f5ce0453f none 2025-09-07 19:03:41 +10:00
timmyhadwen 6440716d3b rename 2025-09-07 17:25:22 +10:00
timmyhadwen c3b5ada5d8 WIP 2025-09-07 17:14:32 +10:00
timmyhadwen a9ca11b8b8 Bump down to 1.8.3 2025-09-07 15:06:43 +10:00
timmyhadwen 05edda8948 updated 2025-09-07 13:21:44 +10:00
timmyhadwen 35543959fa Updated prepanel script 2025-09-07 12:39:14 +10:00
timmyhadwen d60d8d81b3 Swapped step for export_3d as per warning 2025-09-06 18:09:06 +10:00
Tim Hadwen 220e70082f Merged main into kicad9 2025-08-31 17:40:03 +10:00
Tim Hadwen 1c1f8cbcbd Edit kibot-ci.yml 2025-05-22 02:24:52 +00:00
Tim Hadwen d599f31d71 Edit kibot-ci.yml 2025-05-22 02:14:17 +00:00
Tim Hadwen 1e6e4a3ed6 Edit kibot-ci.yml 2025-05-22 02:03:47 +00:00
Tim Hadwen c68606b31d Edit kibot-ci.yml 2025-05-22 01:53:28 +00:00
timmyhadwen f7ccd2da18 Merge branch 'kicad9' of gitlab.com:Micromelon/education/hardware/kicad-ci into kicad9 2025-05-21 19:47:55 +10:00
timmyhadwen 87d40db02b Updaed version 2025-05-21 19:46:35 +10:00
Tim Hadwen c8d6d0abff Revert "Added ignore for libfootprint:"
This reverts commit 7c63818110
2024-07-26 08:41:25 +00:00
timmyhadwen 7c63818110 Added ignore for libfootprint: 2024-07-26 18:22:32 +10:00
timmyhadwen d326456efe Removed bookworm backports as it was for old image 2024-06-03 15:02:44 +10:00
timmyhadwen eacc465d8c Updated to 1.6.5 2024-06-01 11:51:01 +10:00
timmyhadwen 77baad305a Updated image for KiCad8 2024-06-01 11:16:43 +10:00