FIX: variant handling, kintree cli syntax, and PCB image handling
This commit is contained in:
@@ -42,14 +42,14 @@ outputs:
|
||||
type: pdf_sch_print
|
||||
dir: .
|
||||
options:
|
||||
output: "%f%v_%r_%i.%x"
|
||||
output: "%f_%r%v_%i.%x"
|
||||
|
||||
- name: 'print_pcb'
|
||||
comment: "Print Top and Bottom Copper+Silk"
|
||||
type: pcb_print
|
||||
dir: .
|
||||
options:
|
||||
output: "%f%v_%r_PCB.%x"
|
||||
output: "%f_%r%v_PCB.%x"
|
||||
pages:
|
||||
- layers:
|
||||
- layer: F.Cu
|
||||
@@ -81,15 +81,32 @@ outputs:
|
||||
- field: References
|
||||
name: refs
|
||||
exclude_filter: ""
|
||||
output: "%f%v_%r_%i.%x"
|
||||
output: "%f_%r%v_%i.%x"
|
||||
expand_text_vars: true
|
||||
|
||||
- name: 'bom_csv'
|
||||
type: bom
|
||||
dir: .
|
||||
extends: "_bom"
|
||||
disable_run_by_default: _bom
|
||||
options:
|
||||
columns:
|
||||
- field: Value
|
||||
name: value
|
||||
- field: Quantity Per PCB
|
||||
name: qty
|
||||
- field: Footprint
|
||||
name: footprint
|
||||
- field: Datasheet
|
||||
name: datasheet
|
||||
- mpn
|
||||
- manf
|
||||
- rev
|
||||
- conn_manf
|
||||
- conn_mpn
|
||||
- field: References
|
||||
name: refs
|
||||
exclude_filter: ""
|
||||
output: "%f_%r%v_%i.%x"
|
||||
expand_text_vars: true
|
||||
csv:
|
||||
separator: ';'
|
||||
hide_pcb_info: true
|
||||
@@ -99,9 +116,26 @@ outputs:
|
||||
- name: 'bom_xlsx'
|
||||
type: bom
|
||||
dir: .
|
||||
extends: '_bom'
|
||||
disable_run_by_default: _bom
|
||||
options:
|
||||
columns:
|
||||
- field: Value
|
||||
name: value
|
||||
- field: Quantity Per PCB
|
||||
name: qty
|
||||
- field: Footprint
|
||||
name: footprint
|
||||
- field: Datasheet
|
||||
name: datasheet
|
||||
- mpn
|
||||
- manf
|
||||
- rev
|
||||
- conn_manf
|
||||
- conn_mpn
|
||||
- field: References
|
||||
name: refs
|
||||
exclude_filter: ""
|
||||
output: "%f_%r%v_%i.%x"
|
||||
expand_text_vars: true
|
||||
xlsx:
|
||||
hide_pcb_info: true
|
||||
hide_stats_info: true
|
||||
@@ -118,7 +152,7 @@ outputs:
|
||||
type: step
|
||||
dir: .
|
||||
options:
|
||||
output: '%f%v_%r.%x'
|
||||
output: '%f_%r%v.%x'
|
||||
download: false
|
||||
subst_models: true
|
||||
|
||||
@@ -134,7 +168,7 @@ outputs:
|
||||
download: false
|
||||
download_lcsc: false
|
||||
orthographic: true
|
||||
output: 'PCB_%f%v_%r.%x'
|
||||
output: 'PCB_%f_%r%v.%x'
|
||||
show_components: 'none'
|
||||
|
||||
- name: 'pcba_render'
|
||||
@@ -149,14 +183,14 @@ outputs:
|
||||
zoom: -1
|
||||
download_lcsc: false
|
||||
orthographic: true
|
||||
output: 'PCBA_%f%v_%r.%x'
|
||||
output: 'PCBA_%f_%r%v.%x'
|
||||
show_components: 'all'
|
||||
|
||||
- name: 'neo_position'
|
||||
comment: "Pick and place"
|
||||
type: position
|
||||
options:
|
||||
output: '%f%v_%r_cpl.%x'
|
||||
output: '%f_%r%v_cpl.%x'
|
||||
format: CSV
|
||||
units: millimeters
|
||||
separate_files_for_front_and_back: false
|
||||
@@ -167,7 +201,7 @@ outputs:
|
||||
type: stencil_3d
|
||||
dir: '3D_Stencil'
|
||||
options:
|
||||
output: '%f%v_%r_%i.%x'
|
||||
output: '%f_%r%v_%i.%x'
|
||||
|
||||
- name: 'diff_pcb'
|
||||
comment: "Diff for visual comparison"
|
||||
@@ -191,7 +225,7 @@ outputs:
|
||||
type: ibom
|
||||
dir: .
|
||||
options:
|
||||
output: '%f%v_%r_%i.%x'
|
||||
output: '%f_%r%v_%i.%x'
|
||||
dark_mode: true
|
||||
|
||||
- name: 'JLCPCB_gerbers'
|
||||
@@ -244,7 +278,7 @@ outputs:
|
||||
metric_units: true
|
||||
map: gerber
|
||||
route_mode_for_oval_holes: false
|
||||
output: "%f%v_%r_%i.%x"
|
||||
output: "%f_%r%v_%i.%x"
|
||||
|
||||
- name: 'JLCPCB_compress'
|
||||
comment: ZIP file for JLCPCB
|
||||
@@ -255,7 +289,7 @@ outputs:
|
||||
dest: /
|
||||
- from_output: JLCPCB_drill
|
||||
dest: /
|
||||
output: '%f%v_%r_JLC.%x'
|
||||
output: '%f_%r%v_JLC.%x'
|
||||
groups:
|
||||
- name: mech
|
||||
outputs:
|
||||
@@ -272,7 +306,6 @@ groups:
|
||||
- name: pcb_main
|
||||
outputs:
|
||||
- JLCPCB_compress
|
||||
- neo_position
|
||||
- print_pcb
|
||||
- stencil
|
||||
- interactive_bom
|
||||
@@ -280,7 +313,6 @@ groups:
|
||||
- name: panel
|
||||
outputs:
|
||||
- JLCPCB_compress
|
||||
- neo_position
|
||||
- print_pcb
|
||||
- step
|
||||
- interactive_bom
|
||||
|
||||
@@ -4,6 +4,7 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: ['step', 'pcb_render', 'pcba_render']
|
||||
|
||||
preflight:
|
||||
erc: false
|
||||
|
||||
@@ -4,6 +4,7 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: [JLCPCB_compress, neo_position, print_pcb, step, interactive_bom]
|
||||
|
||||
preflight:
|
||||
erc: false
|
||||
|
||||
@@ -4,6 +4,7 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: [print_pcb]
|
||||
|
||||
preflight:
|
||||
erc: false
|
||||
|
||||
@@ -4,6 +4,7 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: [JLCPCB_gerbers, JLCPCB_drill, JLCPCB_compress, print_pcb, stencil]
|
||||
|
||||
preflight:
|
||||
erc: false
|
||||
|
||||
@@ -4,8 +4,9 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: ['neo_position']
|
||||
|
||||
preflight:
|
||||
erc: false
|
||||
update_xml: false
|
||||
drc: true
|
||||
drc: false
|
||||
|
||||
@@ -3,6 +3,7 @@ kibot:
|
||||
|
||||
import:
|
||||
- file: default.kibot.yaml
|
||||
outputs: ['bom_csv','bom_xlsx', 'print_sch', 'interactive_bom']
|
||||
|
||||
preflight:
|
||||
erc: true
|
||||
|
||||
24
kibot-ci.yml
24
kibot-ci.yml
@@ -90,7 +90,7 @@ image:
|
||||
python3 $CI_PROJECT_DIR/.gitlab/.scripts/orig.py ${dir_arr[i-1]}
|
||||
for CONF in $KIBOT_CONF
|
||||
do
|
||||
kibot -e ${dir_arr[i-1]}/${sch_arr[i-1]} -c $CI_PROJECT_DIR/.gitlab/configs/$CONF.kibot.yaml -d $CI_PROJECT_DIR/Fabrication/${dir_arr[i-1]} $VARIANTS $CONF
|
||||
kibot -e ${dir_arr[i-1]}/${sch_arr[i-1]} -c $CI_PROJECT_DIR/.gitlab/configs/$CONF.kibot.yaml -d $CI_PROJECT_DIR/Fabrication/${dir_arr[i-1]} $VARIANTS
|
||||
done
|
||||
mv $CI_PROJECT_DIR/Fabrication/${dir_arr[i-1]}/*.zip Fabrication/ 2> /dev/null || true
|
||||
done
|
||||
@@ -157,24 +157,24 @@ image:
|
||||
for f in $FILES
|
||||
do
|
||||
echo $f
|
||||
name=$(echo $f | cut -c3- | cut -d'-' -f1)A
|
||||
rev=$(echo $f | cut -c3- | cut -d'-' -f1)A
|
||||
fab_path=$CI_PROJECT_DIR/Fabrication/$(dirname $f | cut -c3-)
|
||||
name_n_rev=$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev)
|
||||
echo "name: $name_n_rev"
|
||||
assembly_rev=$(echo $name_n_rev | cut -d'_' -f2)
|
||||
pcb_rev=$(echo $assembly_rev | cut -d'_' -f1,2 | cut -d'.' -f1,2)
|
||||
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', '$CI_PROJECT_DIR/Fabrication/${name_n_rev}_JLC.zip']")
|
||||
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']")
|
||||
full_name=$(echo $f | cut -c3- | rev | cut -d'/' -f1 | cut -c9- | rev)
|
||||
echo "name: $full_name"
|
||||
name_n_rev=$(echo $full_name | cut -d'_' -f1,2)
|
||||
assembly_rev=$(echo $full_name | cut -d'_' -f2)
|
||||
name=$(echo $full_name | cut -d'-' -f1)A$(echo ${full_name//$assembly_rev/.} | cut -d'.' -f2)
|
||||
pcb_rev=$(echo ${assembly_rev} | cut -d'_' -f1,2 | cut -d'.' -f1,2)
|
||||
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', '$CI_PROJECT_DIR/Fabrication/${name_n_rev}_JLC.zip']")
|
||||
pcba_attach=$(echo "['${fab_path}/${full_name}_schematic.pdf', '${fab_path}/${full_name}_bom.csv', '${fab_path}/${full_name}-neo-pos_top.csv', '${fab_path}/${full_name}-neo-pos_bot.csv', '${fab_path}/${full_name}_ibom.html']")
|
||||
|
||||
DRY="--dry assemblies"
|
||||
if [[ $CI_COMMIT_BRANCH == "main" ]]; then
|
||||
DRY=""
|
||||
fi
|
||||
echo "Revs: $pcb_rev, $assembly_rev"
|
||||
python -m kintree.kintree_cli $DRY -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': ['$pcb_rev', '$assembly_rev'], 'image': ['$pcb_im', '$pcba_im'], 'desc': '$desc_suffix', 'attachments': [$pcb_attach, $pcba_attach]}" --settings $KINTREE_SETT --digi_token token_storage.json || FAIL=1
|
||||
python -m kintree.kintree_cli $DRY -b $CI_PROJECT_DIR/Fabrication/$f -a "{'ipn': '$name', 'rev': ['$pcb_rev', '$assembly_rev'], '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
|
||||
- |
|
||||
|
||||
Reference in New Issue
Block a user