Docker image for KiCad automation scripts suitable for CI/CD
Go to file
Salvador E. Tropea 706cc0aa37 Added script to remove old images 2023-03-17 10:08:08 -03:00
.github/workflows Added script to remove old images 2023-03-17 10:08:08 -03:00
deploy Added git pull before tags 2023-03-16 13:50:51 -03:00
ki5 Made the pull.sh and shell image names coherent 2023-03-17 07:19:45 -03:00
ki5_pre Added a mechanism to deploy the results 2023-03-16 09:56:53 -03:00
ki6 Made the pull.sh and shell image names coherent 2023-03-17 07:19:45 -03:00
ki6_pre Added a mechanism to deploy the results 2023-03-16 09:56:53 -03:00
ki7 Made the pull.sh and shell image names coherent 2023-03-17 07:19:45 -03:00
ki7_pre Added a mechanism to deploy the results 2023-03-16 09:56:53 -03:00
manjaro Added scripts for Manjaro test 2022-09-26 08:14:46 -03:00
nightly Test using the dl_deb.py tool 2023-03-08 08:23:02 -03:00
tools Added script to remove old images 2023-03-17 10:08:08 -03:00
.gitignore Added make to the image and updated a couple of tools 2020-04-24 23:33:46 -03:00
LICENSE Initial commit 2020-04-23 11:09:16 -03:00
Makefile Moved nightly to a separated dir and added a workflow for it. 2021-12-05 10:17:02 -03:00
README.md Updated to Debian 11.6, KiCad 6.0.10, KiBot 1.5.1, KiKit 1.2.0 2023-01-06 10:24:47 -03:00
pull.sh Made the pull.sh and shell image names coherent 2023-03-17 07:19:45 -03:00

README.md

kicad_auto

Docker image for KiCad automation scripts suitable for CI/CD

The main objetive is to use it as a base for KiCad automation in CI/CD environments.

The images are uploaded to Docker Hub and GitHub: Compatibility names, KiCad 5 and KiCad 6.

This image is based on setsoft/kicad_debian and adds some automation tools to it:

  • KiBot generate gerbers, drill, position files, etc.
  • KiAuto runs DRC/ERC, prints schematics, PCB, etc.
  • KiBoM generates HTML and CSV BoMs
  • InteractiveHtmlBom generates interactive HTML BoMs
  • PcbDraw generates 2D renders of the PCB
  • KiCost generates BoMs with prices
  • KiCad Git filters helps to reduce unneeded commits for KiCad files when using git
  • KiCad PCB diff a tool to see differences between PCBs, can be used as git plugin

The available tags are:

  • 10.3-5.1.5 is KiCad 5.1.5 on Debian 10.3 with Kiplot 0.2.4, kicad-automation-scripts 1.3.1, KiBoM 1.6.3 and interactivehtmlbom 2.3.1
  • 10.4-5.1.6 is KiCad 5.1.6 on Debian 10.4 with KiBot 0.7.0, kicad-automation-scripts 1.4.2, KiBoM 1.8.0, interactivehtmlbom 2.3.3 and PcbDraw 0.6.0-2
  • 10.4-5.1.9 is KiCad 5.1.9 on Debian 10.4 with KiBot 1.2.0, KiAuto 1.6.15, KiBoM 1.8.0, interactivehtmlbom 2.5.0, KiCost 1.1.10 (+Digi-Key plug-in) and PcbDraw 0.9.0-3
  • 11.4-5.1.9 is KiCad 5.1.9 on Debian 11.4 with KiBot 1.3.0, KiAuto 1.6.15, KiBoM 1.8.0, interactivehtmlbom 2.5.0, KiCost 1.1.10 (+Digi-Key plug-in), PcbDraw 0.9.0-3 and KiDiff 2.2.0
  • 11.5-5.1.9 is KiCad 5.1.9 on Debian 11.5 with KiBot 1.5.1, KiAuto 2.1.0, KiBoM 1.8.0-3, interactivehtmlbom 2.5.0-2, KiCost 1.1.15 (+Digi-Key plug-in), PcbDraw 0.9.0-5 and KiDiff 2.4.3
  • 11.6-5.1.9 (same as latest) is KiCad 5.1.9 on Debian 11.6 with KiBot 1.5.1, KiAuto 2.1.0, KiBoM 1.8.0-3, interactivehtmlbom 2.5.0-2, KiCost 1.1.15 (+Digi-Key plug-in), PcbDraw 0.9.0-5 and KiDiff 2.4.3
  • bullseye-6.0.0-RC1-20211204 (same as nightly) is KiCad 6.0.0 RC1 (20211204) on Debian bullseye with KiBot 0.11.0, kicad-automation-scripts 1.6.5, KiBoM 1.8.0, interactivehtmlbom 2.4.1, KiCost 1.1.5 (+Digi-Key plug-in) and PcbDraw 0.9.0-1
  • ki6.0.0_Ubuntu21.10 KiCad 6.0.0 (final release) on Ubuntu Impish with KiBot 0.11.0, kicad-automation-scripts 1.6.5, KiBoM 1.8.0, interactivehtmlbom 2.4.1, KiCost 1.1.5 (+Digi-Key plug-in) and PcbDraw 0.9.0-1
  • ki6.0.6_Debian KiCad 6.0.6 (6.0.7 libs) on Debian 11.4 with KiBot 1.2.0, kicad-automation-scripts 1.6.15, KiBoM 1.8.0, interactivehtmlbom 2.5.0, KiCost 1.1.10 (+Digi-Key plug-in) and PcbDraw 0.9.0-3
  • ki6.0.7_Debian KiCad 6.0.7 on Debian 11.5 with KiBot 1.4.0, kicad-automation-scripts 2.0.6, KiBoM 1.8.0, interactivehtmlbom 2.5.0, KiCost 1.1.12 (+Digi-Key plug-in), PcbDraw 0.9.0-4 and KiDiff 2.4.2
  • ki6.0.9_Debian KiCad 6.0.9 on Debian 11.5 with KiBot 1.5.1, KiAuto 2.1.0, KiBoM 1.8.0-3, interactivehtmlbom 2.5.0-2, KiCost 1.1.15 (+Digi-Key plug-in), PcbDraw 0.9.0-5, KiKit 1.1.2 and KiDiff 2.4.3
  • ki6.0.10_Debian (same as ki6) KiCad 6.0.10 on Debian 11.6 with KiBot 1.5.1, KiAuto 2.1.0, KiBoM 1.8.0-3, interactivehtmlbom 2.5.0-2, KiCost 1.1.15 (+Digi-Key plug-in), PcbDraw 0.9.0-5, KiKit 1.2.0 and KiDiff 2.4.3

You can run it using a script like this:

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
export WORKDIR=RELATIVE_PATH_TO_KICAD_PROJECTS
export SUBDIR=SUBDIR_INSIDE_WORKDIR
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
    -v $(pwd)/$WORKDIR:/home/$USER/workdir \
    --user $USER_ID:$GROUP_ID \
    --env NO_AT_BRIDGE=1 \
    --workdir="/home/$USER" \
    --volume="/etc/group:/etc/group:ro" \
    --volume="/home/$USER/.config/kicad:/home/$USER/.config/kicad:rw" \
    --volume="/home/$USER/.cache/kicad:/home/$USER/.cache/kicad:rw" \
    --volume="/etc/passwd:/etc/passwd:ro" \
    --volume="/etc/shadow:/etc/shadow:ro" \
    setsoft/kicad_auto:10.3-5.1.5 /bin/bash -c "cd workdir/$SUBDIR; kiplot"

To create the docker image run the build.sh script. This script will download the latest KiPlot and needed tools.

The run.sh script is an example of how to run KiPlot using this image locally. You must edit the file to define the place where your KiCad project is located. The WORKDIR variable indicates the directory where your project and libraries are located. The SUBDIR variable is the subdir inside WORKDIR that contains the schematic and PCB files.