Added attachments to PCB and PCBA parts

This commit is contained in:
andrewc
2024-11-04 17:22:01 +10:00
parent 7b137bedf5
commit cee186c17c
3 changed files with 16 additions and 4 deletions

View File

@@ -177,6 +177,14 @@ outputs:
pcb: false pcb: false
old: KIBOT_TAG-0 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 - name: JLCPCB_gerbers
comment: Gerbers compatible with JLCPCB comment: Gerbers compatible with JLCPCB
type: gerber type: gerber
@@ -246,6 +254,7 @@ groups:
- neo_position - neo_position
- print_pcb - print_pcb
- stencil - stencil
- interactive_bom
- name: sch - name: sch
outputs: outputs:

View File

@@ -154,9 +154,12 @@ image:
echo $f echo $f
name=$(echo $f | cut -c3- | cut -d'-' -f1)A name=$(echo $f | cut -c3- | cut -d'-' -f1)A
fab_path=$CI_PROJECT_DIR/Fabrication/$(dirname $f | cut -c3-) 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 name_n_rev=$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev)
pcba_im=$fab_path/PCBA_$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev).png pcb_im=$fab_path/PCB_$name_n_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 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 done
# - cp token_storage.json /tmp # - cp token_storage.json /tmp
- | - |