From cee186c17cb39b229d0ee39417e9d587108f0794 Mon Sep 17 00:00:00 2001 From: andrewc Date: Mon, 4 Nov 2024 17:22:01 +1000 Subject: [PATCH] Added attachments to PCB and PCBA parts --- .scripts/ki-ntree | 2 +- default.kibot.yaml | 9 +++++++++ kibot-ci.yml | 9 ++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.scripts/ki-ntree b/.scripts/ki-ntree index c12e97f..c836f1a 160000 --- a/.scripts/ki-ntree +++ b/.scripts/ki-ntree @@ -1 +1 @@ -Subproject commit c12e97f9cfabe33a66aae6f6a14087f8d764ad8a +Subproject commit c836f1ab4d67aaf74e0153fc03157a0ac0f21c5e diff --git a/default.kibot.yaml b/default.kibot.yaml index 24fb39c..00b2310 100644 --- a/default.kibot.yaml +++ b/default.kibot.yaml @@ -177,6 +177,14 @@ outputs: pcb: false old: KIBOT_TAG-0 + - name: 'interactive_bom' + comment: "Interactive html BOM" + type: ibom + dir: . + options: + output: '%f_%r_%i.%x' + dark_mode: true + - name: JLCPCB_gerbers comment: Gerbers compatible with JLCPCB type: gerber @@ -246,6 +254,7 @@ groups: - neo_position - print_pcb - stencil + - interactive_bom - name: sch outputs: diff --git a/kibot-ci.yml b/kibot-ci.yml index fa3a4a5..a79d5fe 100644 --- a/kibot-ci.yml +++ b/kibot-ci.yml @@ -154,9 +154,12 @@ image: echo $f name=$(echo $f | cut -c3- | cut -d'-' -f1)A fab_path=$CI_PROJECT_DIR/Fabrication/$(dirname $f | cut -c3-) - pcb_im=$fab_path/PCB_$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev).png - pcba_im=$fab_path/PCBA_$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev).png - poetry run python -m kintree_cli -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': '$TAG', 'image': ['$pcb_im', '$pcba_im'], 'desc': '$desc_suffix'}" --settings $KINTREE_SETT --digi_token token_storage.json || FAIL=1 + name_n_rev=$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev) + pcb_im=$fab_path/PCB_$name_n_rev.png + pcba_im=$fab_path/PCBA_$name_n_rev.png + pcb_attach=$(echo "['$fab_path/${name_n_rev}_PCB.pdf']") + pcba_attach=$(echo "['$fab_path/${name_n_rev}_schematic.pdf', '$fab_path/${name_n_rev}_bom.csv', '$fab_path/${name_n_rev}-neo-pos_top.csv', '$fab_path/${name_n_rev}-neo-pos_bot.csv', '$fab_path/${name_n_rev}_ibom.html']") + poetry run python -m kintree_cli -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': '$TAG', 'image': ['$pcb_im', '$pcba_im'], 'desc': '$desc_suffix', 'attachments': [$pcb_attach, $pcba_attach]}" --settings $KINTREE_SETT --digi_token token_storage.json || FAIL=1 done # - cp token_storage.json /tmp - |