Compare commits

...

84 Commits
n14 ... master

Author SHA1 Message Date
Salvador E. Tropea a0efc4190e [DOCs] Updated the KiKit and KiAuto versions, also added KiCad 8 2024-03-22 19:13:37 -03:00
Salvador E. Tropea a9f12ff2eb Bumped iteration 2024-03-22 07:49:18 -03:00
Salvador E. Tropea 4380217e36 Bumped GHA versions
Node.js 16 deprecated
2024-03-21 13:02:33 -03:00
Salvador E. Tropea 37f20da5b1 Added KiCad 8 images 2024-03-21 12:55:35 -03:00
Salvador E. Tropea 554bc21904 Updated current 1.6.4 content 2024-03-06 13:26:20 -03:00
Salvador E. Tropea 5a59d4643a [DOCs] Updated the tags 2024-03-04 09:05:11 -03:00
Salvador E. Tropea 93eb6c1aee [DOCs] Updated the KiDiff project name 2024-03-04 08:43:32 -03:00
Salvador E. Tropea 85eb07f88b Bumped iteration 2024-02-13 20:21:21 -03:00
Salvador E. Tropea 144ebcbb3b Iteration 4 (KiCad 7.0.10) 2024-02-02 07:41:03 -03:00
Salvador E. Tropea 8d0f77d34e Added experimental meta data to the dev images
See INTI-CMNB/KiBot#527
2023-12-06 13:23:25 -03:00
Salvador E. Tropea 6c77283c0b
Merge pull request #15 from Cimos/fix-broken-kicad_7_auto-link
Update kicad7_auto link to point to correct page
2023-11-02 12:42:16 -03:00
Simon 107816c105 Update kicad7_auto link to point to correct page 2023-11-02 13:49:39 +11:00
Salvador E. Tropea af7a391ad2 Fixed typo in garbage collector 2023-10-18 11:14:04 -03:00
Salvador E. Tropea 23f4e22953 Made the garbage collector more tolerant to fails 2023-10-18 11:11:05 -03:00
Salvador E. Tropea 445e0005de Reset iteration counter 2023-04-24 12:59:05 -03:00
Salvador E. Tropea 361c456747 Iteration 5 2023-04-15 21:08:26 -03:00
Salvador E. Tropea e6f19beba9 Iteration 4 2023-04-06 16:09:38 -03:00
Salvador E. Tropea 931e04ebed Bumped iteration to 3 2023-03-31 18:38:50 -03:00
Salvador E. Tropea c115f2370e Added patched dl_deb.py
- sleep from time
2023-03-30 07:57:41 -03:00
Salvador E. Tropea 3f583288c8 Added image with the packages/layers 2023-03-19 11:35:21 -03:00
Salvador E. Tropea ca0b3ca8de Better README.md 2023-03-17 21:25:23 -03:00
Salvador E. Tropea a5c87ca97e Avoid deleting things like dev_k6 2023-03-17 10:35:34 -03:00
Salvador E. Tropea 706cc0aa37 Added script to remove old images 2023-03-17 10:08:08 -03:00
Salvador E. Tropea 6922f1be13 Made the pull.sh and shell image names coherent 2023-03-17 07:19:45 -03:00
Salvador E. Tropea 397e2c4c1f Added git pull before tags 2023-03-16 13:50:51 -03:00
Salvador E. Tropea 1d3fae5092 Added a mechanism to deploy the results
- It just tags the compatibility tags using the official names
- So now we use the compatibility tags first and leave the official
  tags for the deployment.
- Also added flag to stop on errors
2023-03-16 09:56:53 -03:00
Salvador E. Tropea 05d073e562 Adapted KiCad 5 and 7 to the new layers 2023-03-15 13:51:31 -03:00
Salvador E. Tropea f578739521 Adapted KiCad 6 images to the new layers 2023-03-15 13:22:52 -03:00
Salvador E. Tropea e555fd4c2e Switching to dl_deb.py 2023-03-08 09:11:36 -03:00
Salvador E. Tropea 8b295755fc Test using the dl_deb.py tool
- The one line shell thing seems to silently fail
2023-03-08 08:23:02 -03:00
Salvador E. Tropea 9587bb96e9 Avoid installing the KiKit docs 2023-03-06 13:44:03 -03:00
Salvador E. Tropea 56d5b54615 Now fetching pcbnewTransition from its own site 2023-03-03 09:25:00 -03:00
Salvador E. Tropea 5cada884d7 Build nightly from GH 2023-02-23 13:57:46 -03:00
Salvador E. Tropea d382a39c45 Added KiCad 7 nightly 2023-02-08 13:22:19 -03:00
Salvador E. Tropea 951d22c4ed Added tag update 2023-02-06 13:35:47 -03:00
Salvador E. Tropea d40a876b9f Fixed missing line concat 2023-02-06 11:39:23 -03:00
Salvador E. Tropea 2bb5e714d7 Another fix for git issues 2023-02-06 11:37:30 -03:00
Salvador E. Tropea 8e5b9ece16 Switched docker actions versions to avoid messages about obsolete node 2023-02-06 11:27:45 -03:00
Salvador E. Tropea 63002dde72 Fix for git issues on GitHub
- Now adding this to the /etc/gitconfig file
2023-02-06 11:09:47 -03:00
Salvador E. Tropea 729e5b5656 Trying to fix new git issues on GitHub 2023-02-06 10:21:07 -03:00
Salvador E. Tropea 12d8b3314d Upated tags 2023-02-06 10:18:55 -03:00
Salvador E. Tropea 7ebf705745 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
Salvador E. Tropea 1e650bc0a1 Updated KiCost 1.1.15, real KiCad 6.0.9 2022-12-16 10:52:22 -03:00
Salvador E. Tropea ed99e16a9b Updated KiCost to 1.1.14 2022-12-14 11:40:49 -03:00
Salvador E. Tropea fe9de929b0 Current KiKit is only for KiCad 6 2022-11-29 14:55:04 -03:00
Salvador E. Tropea 1ff8a71359 Added KiKit 2022-11-29 14:21:37 -03:00
Salvador E. Tropea d15ec399ff KiCad 6.0.9 and KiBoM 1.8.0-3 2022-11-08 14:32:17 -03:00
Salvador E. Tropea 22332d0bb6 Updated iBoM to 2.5.0-2 2022-10-24 10:21:46 -03:00
Salvador E. Tropea 7cf1f8fbef Updated for new release 2022-10-13 07:58:49 -03:00
Salvador E. Tropea 30f066f819 Added GitHub links to the README.md
Also updated tools versions
2022-10-12 10:03:25 -03:00
Salvador E. Tropea 26ae425f9a Updated the tagging script 2022-10-12 09:57:08 -03:00
Salvador E. Tropea 96c061d580 Added push to kicadN_auto 2022-09-27 07:51:49 -03:00
Salvador E. Tropea 4c96116999 Changed docker files to pull from GH 2022-09-27 07:29:37 -03:00
Salvador E. Tropea 9711d39acc Updated the push script (now generated) 2022-09-26 13:54:28 -03:00
Salvador E. Tropea 2790c68add Added script to sync GitHub and Docker Hub tags 2022-09-26 13:53:50 -03:00
Salvador E. Tropea fb21d43836 Fixed tags 2022-09-26 10:51:16 -03:00
Salvador E. Tropea 5b60d83552 Added GitHub Packages docker image push 2022-09-26 09:56:58 -03:00
Salvador E. Tropea 58c92f92ac Reverted test, it doesn't work 2022-09-26 08:49:22 -03:00
Salvador E. Tropea 9c6cfdb261 Test using GITHUB_TOKEN 2022-09-26 08:39:33 -03:00
Salvador E. Tropea f9fe688f7b Fixed Manjaro build 2022-09-26 08:15:05 -03:00
Salvador E. Tropea 4371dff5b5 Added scripts for Manjaro test 2022-09-26 08:14:46 -03:00
Salvador E. Tropea 8fe368b66b Updated push versions 2022-09-26 08:14:26 -03:00
Salvador E. Tropea 510422f36a Added experimental Manjaro image 2022-09-25 18:55:02 -03:00
Salvador E. Tropea b29c86006e Updated to KiBot 1.3.0 2022-09-08 09:28:53 -03:00
Salvador E. Tropea 5e3a9b85d8 Changed default build to latest 2022-09-08 09:28:38 -03:00
Salvador E. Tropea 57533b4b2f Added script to pull all current aliases 2022-09-08 09:28:16 -03:00
Salvador E. Tropea a66df8d042 [KiCad 6] Switched to git from backports
- It can handle errors produced on repos used by Windows and
  Linux at the same time.

Related to INTI-CMNB/KiBot#265
2022-09-01 14:07:30 -03:00
Salvador E. Tropea 7d6bf91a27 Documented KiDiff and updated the name 2022-08-24 08:41:30 -03:00
Salvador E. Tropea 9bbeca9204 Added KiCad 6.0.7 2022-08-17 10:41:26 -03:00
Salvador E. Tropea c325ab170c Added KiCad PCB diff
- Also updated the list of tools
2022-08-13 20:57:52 -03:00
Salvador E. Tropea cf1afcd9d3 [KiCad 6] Updated to 6.0.6 2022-08-11 18:12:16 -03:00
Salvador E. Tropea 65d8b36f8f [KiCad 5] Fixed Debian version 2022-08-11 17:40:09 -03:00
Salvador E. Tropea a230c36c04 [KiCad 5] Added Debian 11.3 + 5.1.9 as latest 2022-08-11 17:28:01 -03:00
Salvador E. Tropea 5f1e19be9b Added KiCad GIT filters 2022-06-14 14:59:45 -03:00
Salvador E. Tropea 865135fbe7 Moved the place where we patch ImageMagick config 2022-06-14 11:36:11 -03:00
Salvador E. Tropea 1cb0aba7d7 Added missing patch for ghostscript permissions 2022-06-14 11:25:46 -03:00
Salvador E. Tropea 0f32d114e4 Added Ghostscript, now recommended. 2022-06-14 10:16:47 -03:00
Salvador E. Tropea 7af7532e6a Fixed KiCost Debian package source
- Now I can release on the upstream repo
2022-05-14 15:29:17 -03:00
Salvador E. Tropea add8bfd42a Added triggers for KiCad-Auto-Test 2022-03-26 17:29:12 -03:00
Salvador E. Tropea d093eb362e Added triggers for k6 and nightly 2022-03-26 17:17:29 -03:00
Salvador E. Tropea f2c0d804a6 Test adding repository_dispatch trigger 2022-03-26 17:15:00 -03:00
Salvador E. Tropea 02bec376a0 Added test script for the `dev_k6` image 2022-03-25 10:08:33 -03:00
Salvador E. Tropea 9a833f437e Added KiCost Digi-Key plug-in 2022-03-21 18:24:24 -03:00
Salvador E. Tropea 020f808f28 Updated KiAuto 2022-03-08 11:45:59 -03:00
61 changed files with 1094 additions and 148 deletions

25
.github/workflows/clean.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Erase old versions
on:
push:
tags:
- clean_*
repository_dispatch:
types: [clean]
jobs:
do_clean:
name: Remove old versions
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Remove old untagged and dev_* versions
run: |
cd tools
python3 garbage_collector.py ${{ secrets.PKG_TOKEN }}

38
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Tag images to make them visible
on:
push:
tags:
- deploy_*
repository_dispatch:
types: [deploy]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate official tags
run: |
cd deploy
./build.sh

View File

@ -1,35 +0,0 @@
name: Docker Hub upload (normal)
on:
push:
tags:
- b*
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: setsoft/kicad_auto
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
# context: tools/dev_image
push: true
tags: setsoft/kicad_auto:latest
labels: ${{ steps.meta.outputs.labels }}

38
.github/workflows/docker_hub_ki5.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: KiBot (KiCad 5) Docker image
on:
push:
tags:
- ki5_*
repository_dispatch:
types: [build_k5]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki5
./build.sh

View File

@ -0,0 +1,42 @@
name: KiBot (KiCad 5 deps) Docker image
on:
push:
tags:
- ki5p_*
repository_dispatch:
types: [build_k5p]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki5_pre
./build.sh
- name: Trigger KiCad-Auto image build
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "build_k5"}'

View File

@ -1,35 +1,38 @@
name: Docker Hub upload (KiCad 6)
name: KiBot (KiCad 6) Docker image
on:
push:
tags:
- ki6_*
repository_dispatch:
types: [build_k6]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
images: setsoft/kicad_auto
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ki6
push: true
tags: setsoft/kicad_auto:ki6
labels: ${{ steps.meta.outputs.labels }}
run: |
cd ki6
./build.sh

View File

@ -0,0 +1,42 @@
name: KiBot (KiCad 6 deps) Docker image
on:
push:
tags:
- ki6p_*
repository_dispatch:
types: [build_k6p]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki6_pre
./build.sh
- name: Trigger KiCad-Auto image build
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "build_k6"}'

38
.github/workflows/docker_hub_ki7.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: KiBot (KiCad 7) Docker image
on:
push:
tags:
- ki7_*
repository_dispatch:
types: [build_k7]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki7
./build.sh

View File

@ -0,0 +1,42 @@
name: KiBot (KiCad 7 deps) Docker image
on:
push:
tags:
- ki7p_*
repository_dispatch:
types: [build_k7p]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki7_pre
./build.sh
- name: Trigger KiCad-Auto image build
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "build_k7"}'

38
.github/workflows/docker_hub_ki8.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: KiBot (KiCad 8) Docker image
on:
push:
tags:
- ki8_*
repository_dispatch:
types: [build_k8]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki8
./build.sh

View File

@ -0,0 +1,42 @@
name: KiBot (KiCad 8 deps) Docker image
on:
push:
tags:
- ki8p_*
repository_dispatch:
types: [build_k8p]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
cd ki8_pre
./build.sh
- name: Trigger KiCad-Auto image build
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto/dispatches --data '{"event_type": "build_k8"}'

55
.github/workflows/docker_hub_mk6.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: Docker Hub upload (normal)
on:
push:
tags:
- b*
repository_dispatch:
types: [build_mk6]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub and GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
setsoft/kicad_auto
ghcr.io/${{ github.repository }}
ghcr.io/inti-cmnb/kicad6_auto
tags: |
type=raw,manjaro_k6
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: manjaro
push: true
tags: |
setsoft/kicad_auto:manjaro_k6
ghcr.io/inti-cmnb/kicad_auto:manjaro_k6
ghcr.io/inti-cmnb/kicad6_auto:manjaro
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,35 +1,57 @@
name: Docker Hub upload (nightly)
name: Docker Hub upload (KiCad 7 nightly)
on:
push:
tags:
- n*
repository_dispatch:
types: [build_ng]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
name: Push Docker image to Docker Hub and GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: setsoft/kicad_auto
images: |
setsoft/kicad_auto
ghcr.io/${{ github.repository }}
tags: |
type=raw,nightly
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: nightly
push: true
tags: setsoft/kicad_auto:nightly
tags: |
setsoft/kicad_auto:nightly
ghcr.io/inti-cmnb/kicad_auto:nightly
labels: ${{ steps.meta.outputs.labels }}
- name: Trigger KiCad-Auto-Test image build
run: |
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_auto_test/dispatches --data '{"event_type": "build_ng"}'

View File

@ -1,19 +0,0 @@
FROM setsoft/kicad_debian:latest
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad with KiBot and other automation scripts"
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y install -t buster-backports make wget curl rar bzip2 librsvg2-bin && \
apt-get -y install --no-install-recommends imagemagick python3-qrcodegen git poppler-utils && \
curl -s https://api.github.com/repos/INTI-CMNB/KiAuto/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBoM/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/InteractiveHtmlBom/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/PcbDraw/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiCost/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBot/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y remove curl wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/*

BIN
Layers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -2,25 +2,77 @@
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](https://github.com/INTI-CMNB/kicad_ci_test).
The main objetive is to use it as a base for [KiCad automation in CI/CD environments](https://github.com/INTI-CMNB/KiBot).
The images are uploaded to [Docker Hub](https://hub.docker.com/r/setsoft/kicad_auto).
The images are uploaded to [Docker Hub](https://hub.docker.com/r/setsoft/kicad_auto) and GitHub:
[KiCad 5](https://github.com/INTI-CMNB/kicad_auto/pkgs/container/kicad5_auto),
[KiCad 6](https://github.com/INTI-CMNB/kicad_auto/pkgs/container/kicad6_auto),
[KiCad 7](https://github.com/INTI-CMNB/kicad_auto/pkgs/container/kicad7_auto),
[KiCad 8](https://github.com/INTI-CMNB/kicad_auto/pkgs/container/kicad8_auto) and
[Old compatibility names](https://github.com/INTI-CMNB/kicad_auto/pkgs/container/kicad_auto),
This image is based on [setsoft/kicad_debian](https://github.com/INTI-CMNB/kicad_debian) and adds some automation tools to it:
This image is based on [kicad_debian](https://github.com/INTI-CMNB/kicad_debian) and adds some automation tools to it:
* [Kiplot](https://github.com/INTI-CMNB/kiplot) generate gerbers, drill and position files
* [kicad-automation-scripts](https://github.com/INTI-CMNB/kicad-automation-scripts) runs DRC/ERC, prints schematics and PCB
* [KiBot](https://github.com/INTI-CMNB/KiBot) generate gerbers, drill, position files, etc.
* [KiAuto](https://github.com/INTI-CMNB/KiAuto) runs DRC/ERC, prints schematics, PCB, etc.
* [KiBoM](https://github.com/INTI-CMNB/KiBoM) generates HTML and CSV BoMs
* [InteractiveHtmlBom](https://github.com/INTI-CMNB/InteractiveHtmlBom) generates interactive HTML BoMs
* [PcbDraw](https://github.com/INTI-CMNB/PcbDraw) generates 2D renders of the PCB
* [KiCost](https://github.com/hildogjr/KiCost) generates BoMs with prices
* [KiCad Git filters](https://github.com/INTI-CMNB/kicad-git-filters) helps to reduce unneeded commits for KiCad files when using git
* [KiDiff](https://github.com/INTI-CMNB/KiDiff) a tool to see differences between PCBs and schematics, can be used as git plugin
* [KiKit](https://github.com/yaqwsx/KiKit) stencil and panelization tools
The available tags are:
The relation between the packages that contains the images is as depicted in the following image:
* **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** (same as **latest**) is KiCad 5.1.9 on Debian 10.4 with KiBot 0.11.0, KiAuto 1.6.4, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1
* **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.4, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1
* **ki6.0.0_Ubuntu21.10** (same as **ki6**) KiCad 6.0.0 (final release) on is Ubuntu Impish with KiBot 0.11.0, kicad-automation-scripts 1.6.4, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1
![Layers](Layers.png)
Here are some of the available images:
## KiCad 5
| Name | KiBot | KiCad | Debian | KiAuto | KiBoM | iBoM | KiCost | DK plug | PcbDraw | KiDiff |
| :---------------------------------------- | ------ | ----- | ------ | ------ | ------- | -------- | ------ | ------- | ------- | -----: |
| setsoft/kicad_auto:10.3-5.1.5 | 0.2.4 | 5.1.5 | 10.3 | 1.3.1 | 1.6.3 | 2.3.1 | -- | -- | -- | -- |
| setsoft/kicad_auto:10.4-5.1.6 | 0.7.0 | 5.1.6 | 10.4 | 1.4.2 | 1.8.0 | 2.3.3 | -- | -- | 0.6.0-2 | -- |
| ghcr.io/inti-cmnb/kicad5_auto:1.2.0 | 1.2.0 | 5.1.9 | 10.4 | 1.6.15 | 1.8.0 | 2.5.0 | 1.1.10 | 0.1.1 | 0.9.0-3 | -- |
| ghcr.io/inti-cmnb/kicad5_auto:1.3.0 | 1.3.0 | 5.1.9 | 11.5 | 2.0.6 | 1.8.0-2 | 2.5.0 | 1.1.12 | 0.1.2 | 0.9.0-4 | 2.4.2 |
| ghcr.io/inti-cmnb/kicad5_auto:1.4.0 | 1.4.0 | 5.1.9 | 11.5 | 2.0.6 | 1.8.0-3 | 2.5.0-2 | 1.1.15 | 0.1.2 | 0.9.0-5 | 2.4.3 |
| ghcr.io/inti-cmnb/kicad5_auto:1.5.1 | 1.5.1 | 5.1.9 | 11.6 | 2.1.1 | 1.8.0-3 | 2.5.0-2 | 1.1.15 | 0.1.2 | 0.9.0-5 | 2.4.3 |
| ghcr.io/inti-cmnb/kicad5_auto:1.6.0 | 1.6.0 | 5.1.9 | 11.6 | 2.2.1 | 1.8.0-3 | 2.5.0-3 | 1.1.15 | 0.1.2 | -- | 2.4.5 |
| ghcr.io/inti-cmnb/kicad5_auto:1.6.1 | 1.6.1 | 5.1.9 | 11.6 | 2.2.1 | 1.8.0-3 | 2.5.0-3 | 1.1.15 | 0.1.2 | -- | 2.4.5 |
| ghcr.io/inti-cmnb/kicad5_auto:1.6.2 | 1.6.2 | 5.1.9 | 11.6 | 2.2.6 | 1.9.0 | 2.6.0 | 1.1.17 | 0.1.2 | -- | 2.4.7 |
| ghcr.io/inti-cmnb/kicad5_auto:1.6.3 | 1.6.3 | 5.1.9 | 11.6 | 2.2.8 | 1.9.1 | 2.8.1 | 1.1.18 | 0.1.2 | -- | 2.5.3 |
| ghcr.io/inti-cmnb/kicad5_auto:1.6.4 | 1.6.4 | 5.1.9 | 11.6 | 2.3.0 | 1.9.1 | 2.8.1 | 1.1.18 | 0.1.2 | -- | 2.5.3 |
## KiCad 6
| Name | KiBot | KiCad | Debian | KiAuto | KiBoM | iBoM | KiCost | DK plug | PcbDraw | KiDiff | KiKit |
| :---------------------------------------- | ------ | ------ | ------ | ------ | ------- | -------- | ------ | ------- | ------- | ------ | ------: |
| setsoft/kicad_auto:ki6.0.0_Ubuntu21.10 | 0.11.0 | 6.0.0 | U21.10 | 1.6.5 | 1.8.0 | 2.4.1 | 1.1.15 | 0.1.2 | 0.9.0-1 | -- | -- |
| ghcr.io/inti-cmnb/kicad6_auto:1.2.0 | 1.2.0 | 6.0.5 | 11.3 | 1.6.15 | 1.8.0-2 | 2.5.0 | 1.1.10 | 0.1.1 | 0.9.0-3 | -- | -- |
| ghcr.io/inti-cmnb/kicad6_auto:1.3.0 | 1.3.0 | 6.0.7 | 11.5 | 2.0.6 | 1.8.0-2 | 2.5.0 | 1.1.12 | 0.1.2 | 0.9.0-4 | 2.4.2 | -- |
| ghcr.io/inti-cmnb/kicad6_auto:1.5.1 | 1.5.1 | 6.0.10 | 11.6 | 2.1.1 | 1.8.0-3 | 2.5.0-2 | 1.1.15 | 0.1.2 | 0.9.0-5 | 2.4.3 | 1.2.0 |
| ghcr.io/inti-cmnb/kicad6_auto:1.6.0 | 1.6.0 | 6.0.11 | 11.6 | 2.2.1 | 1.8.0-3 | 2.5.0-3 | 1.1.15 | 0.1.2 | -- | 2.4.5 | 1.3.0-5 |
| ghcr.io/inti-cmnb/kicad6_auto:1.6.1 | 1.6.1 | 6.0.11 | 11.6 | 2.2.1 | 1.8.0-3 | 2.5.0-3 | 1.1.15 | 0.1.2 | -- | 2.4.5 | 1.3.0-5 |
| ghcr.io/inti-cmnb/kicad6_auto:1.6.2 | 1.6.2 | 6.0.11 | 11.6 | 2.2.6 | 1.9.0 | 2.6.0 | 1.1.17 | 0.1.2 | -- | 2.4.7 | 1.3.0-7 |
| ghcr.io/inti-cmnb/kicad6_auto:1.6.3 | 1.6.3 | 6.0.11 | 12.1 | 2.2.8 | 1.9.1 | 2.8.1 | 1.1.18 | 0.1.2 | -- | 2.5.3 | 1.4.0 |
| ghcr.io/inti-cmnb/kicad6_auto:1.6.4 | 1.6.4 | 6.0.11 | 12.1 | 2.3.0 | 1.9.1 | 2.8.1 | 1.1.18 | 0.1.2 | -- | 2.5.3 | 1.5.1 |
## KiCad 7
| Name | KiBot | KiCad | Debian | KiAuto | KiBoM | iBoM | KiCost | DK plug | KiDiff | KiKit |
| :---------------------------------------- | ------ | ------- | ------ | ------ | ------- | -------- | ------ | ------- | ------ | ------: |
| ghcr.io/inti-cmnb/kicad7_auto:1.6.1 | 1.6.1 | 7.0.1.1 | 11.6 | 2.2.1 | 1.8.0-3 | 2.5.0-3 | 1.1.15 | 0.1.2 | 2.4.5 | 1.3.0-5 |
| ghcr.io/inti-cmnb/kicad7_auto:1.6.2 | 1.6.2 | 7.0.5.1 | 11.6 | 2.2.6 | 1.9.0 | 2.6.0 | 1.1.17 | 0.1.2 | 2.4.7 | 1.3.0-7 |
| ghcr.io/inti-cmnb/kicad7_auto:1.6.3 | 1.6.3 | 7.0.10 | 12.1 | 2.2.8 | 1.9.1 | 2.8.1 | 1.1.18 | 0.1.2 | 2.5.3 | 1.4.0 |
| ghcr.io/inti-cmnb/kicad7_auto:1.6.4 | 1.6.4 | 7.0.11 | 12.1 | 2.3.0 | 1.9.1 | 2.9.0 | 1.1.18 | 0.1.2 | 2.5.3 | 1.5.1 |
## KiCad 8
| Name | KiBot | KiCad | Debian | KiAuto | KiBoM | iBoM | KiCost | DK plug | KiDiff | KiKit |
| :---------------------------------------- | ------ | ------- | ------ | ------ | ------- | -------- | ------ | ------- | ------ | ------: |
| ghcr.io/inti-cmnb/kicad8_auto:1.6.4 | 1.6.4 | 8.0.1 | sid | 2.3.0 | 1.9.1 | 2.9.0 | 1.1.18 | 0.1.2 | 2.5.3 | 1.5.1 |
You can run it using a script like this:
@ -39,15 +91,5 @@ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--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"
ghcr.io/inti-cmnb/kicad7_auto:1.6.4 /bin/bash -c "cd workdir/$SUBDIR; kibot"
```
To create the docker image run the [build.sh](https://github.com/INTI-CMNB/kicad_auto/blob/master/build.sh) script.
This script will download the latest KiPlot and needed tools.
The [run.sh](https://github.com/INTI-CMNB/kicad_auto/blob/master/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.

View File

@ -1,2 +0,0 @@
#!/bin/sh
docker build -f Dockerfile -t setsoft/kicad_auto:10.4-5.1.6 .

27
deploy/build.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
set -e
# KiCad 6, tag the generic ki6 as latest and also for Docker Hub
docker pull ghcr.io/inti-cmnb/kicad_auto:ki6
docker tag ghcr.io/inti-cmnb/kicad_auto:ki6 setsoft/kicad_auto:ki6
docker tag ghcr.io/inti-cmnb/kicad_auto:ki6 ghcr.io/inti-cmnb/kicad6_auto:latest
docker push setsoft/kicad_auto:ki6
docker push ghcr.io/inti-cmnb/kicad6_auto:latest
# KiCad 7
docker pull ghcr.io/inti-cmnb/kicad_auto:ki7
docker tag ghcr.io/inti-cmnb/kicad_auto:ki7 setsoft/kicad_auto:ki7
docker tag ghcr.io/inti-cmnb/kicad_auto:ki7 ghcr.io/inti-cmnb/kicad7_auto:latest
docker push setsoft/kicad_auto:ki7
docker push ghcr.io/inti-cmnb/kicad7_auto:latest
# KiCad 8
docker pull ghcr.io/inti-cmnb/kicad_auto:ki8
docker tag ghcr.io/inti-cmnb/kicad_auto:ki8 setsoft/kicad_auto:ki8
docker tag ghcr.io/inti-cmnb/kicad_auto:ki8 ghcr.io/inti-cmnb/kicad8_auto:latest
docker push setsoft/kicad_auto:ki8
docker push ghcr.io/inti-cmnb/kicad8_auto:latest
# KiCad 5
docker pull ghcr.io/inti-cmnb/kicad_auto:ki5
docker tag ghcr.io/inti-cmnb/kicad_auto:ki5 setsoft/kicad_auto:latest
docker tag ghcr.io/inti-cmnb/kicad_auto:ki5 ghcr.io/inti-cmnb/kicad5_auto:latest
docker push setsoft/kicad_auto:latest
docker push ghcr.io/inti-cmnb/kicad5_auto:latest

70
dl_deb.py Executable file
View File

@ -0,0 +1,70 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2023 Salvador E. Tropea
# Copyright (c) 2023 Instituto Nacional de Tecnologïa Industrial
# License: GPLv3
# Simple Git Hub release downloader
import argparse
import json
import os
import requests
import sys
from time import sleep
from urllib.parse import unquote
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0'
def error(msg):
print(msg)
exit(3)
def get_request(url):
retry = 4
while retry:
r = requests.get(url, timeout=20, allow_redirects=True, headers={'User-Agent': USER_AGENT})
if r.status_code == 200:
return r
if r.status_code == 403:
# GitHub returns 403 randomly (saturated?)
sleep(1 << (4-retry))
retry -= 1
else:
retry = 0
error(f'Failed to get release info, status {r.status_code}')
def download(url, skip):
fname = unquote(os.path.basename(url))
for s in skip:
if fname.startswith(s):
print(f"Skipping `{fname}`")
return
if os.path.isfile(fname):
print(f"`{fname}` already downloaded, won't overwrite")
return
print(f"Downloading `{fname}`")
res = get_request(url)
print(f"Saving `{fname}`")
with open(fname, 'wb') as f:
f.write(res.content)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Debian package downloader for GitHub releases')
parser.add_argument('project', help='The user/project to fetch')
parser.add_argument('--skip', '-s', help='Skip files starting with', type=str, nargs='+', default=[])
parser.add_argument('--release', '-r', help='Release to download', type=str, default='latest')
args = parser.parse_args()
if args.release != 'latest':
args.release = 'tags/'+args.release
url = 'https://api.github.com/repos/'+args.project+'/releases/'+args.release
print(f"Downloading `{args.release}` release of `{args.project}` ({url})")
res = get_request(url)
r = res.json()
for a in r['assets']:
download(a['browser_download_url'], args.skip)

1
iteration.sh Normal file
View File

@ -0,0 +1 @@
IT=6

28
ki5/Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM ghcr.io/inti-cmnb/kicad5_auto:latest_deps
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad 5 w/KiBot and other automation scripts"
LABEL org.opencontainers.image.description "KiCad 5 w/KiBot and other automation scripts"
# Install all the tools, dependencies are already installed
RUN apt-get update && \
dl_deb.py INTI-CMNB/KiBoM && \
dl_deb.py INTI-CMNB/kicad-git-filters && \
dl_deb.py set-soft/kicost-digikey-api-v3 && \
dl_deb.py hildogjr/KiCost && \
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
dl_deb.py INTI-CMNB/KiAuto && \
dl_deb.py INTI-CMNB/kidiff && \
dl_deb.py INTI-CMNB/KiBot && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
ARG iteration
ENV KIBOT_ITERATION=$iteration
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \
echo -n -${KIBOT_ITERATION}_k >> /etc/kiauto_tag && \
kicad_version.py >> /etc/kiauto_tag && \
echo -n _d >> /etc/kiauto_tag && \
cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag

20
ki5/build.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
set -e
. ../iteration.sh
docker build -f Dockerfile --build-arg iteration=${IT} -t ghcr.io/inti-cmnb/kicad5_auto:latest .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad5_auto:latest kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'`
TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad5_auto:latest kicad_version.py`
TG3=d`docker run --rm ghcr.io/inti-cmnb/kicad5_auto:latest cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad5_auto:latest ghcr.io/inti-cmnb/kicad5_auto:${TG1}-${IT}_${TG2}_${TG3}
docker tag ghcr.io/inti-cmnb/kicad5_auto:latest ghcr.io/inti-cmnb/kicad5_auto:${TG1}
docker tag ghcr.io/inti-cmnb/kicad5_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki5
docker tag ghcr.io/inti-cmnb/kicad5_auto:latest ghcr.io/inti-cmnb/kicad_auto:latest
docker push ghcr.io/inti-cmnb/kicad5_auto:${TG1}-${IT}_${TG2}_${TG3}
docker push ghcr.io/inti-cmnb/kicad5_auto:${TG1}
docker push ghcr.io/inti-cmnb/kicad_auto:ki5
docker push ghcr.io/inti-cmnb/kicad_auto:latest
# Leave the following for the deploy:
#docker tag ghcr.io/inti-cmnb/kicad5_auto:latest setsoft/kicad_auto:latest
#docker push ghcr.io/inti-cmnb/kicad5_auto:latest
#docker push setsoft/kicad_auto:latest

2
ki5/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad_auto:ki5 /bin/bash

View File

@ -10,4 +10,4 @@ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
setsoft/kicad_auto:dev /bin/bash
ghcr.io/inti-cmnb/kicad_auto:ki5 /bin/bash

18
ki5_pre/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM ghcr.io/inti-cmnb/kicad5_debian:latest
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="Layer used for new dependencies"
LABEL org.opencontainers.image.description "Layer used for new dependencies"
RUN apt-get update && \
echo "Use wget to download some stuff" && \
apt -y install --no-install-recommends wget && \
echo "XLSX Writer 3 fixes some important limitations in URLs (used by KiBoM, KiCost, KiBot, etc.)" && \
wget http://http.us.debian.org/debian/pool/main/x/xlsxwriter/python3-xlsxwriter_3.0.2-2_all.deb && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y remove wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
# Fix for the .deb downloader, should be removed in the next OS iteration
COPY dl_deb.py /usr/bin/

10
ki5_pre/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
cp ../dl_deb.py .
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad5_auto:latest_deps .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad5_auto:latest_deps kicad_version.py`
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad5_auto:latest_deps cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad5_auto:latest_deps ghcr.io/inti-cmnb/kicad5_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad5_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad5_auto:latest_deps

2
ki5_pre/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad5_auto:latest_deps /bin/bash

13
ki5_pre/run_shell_same_user.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/home/$USER:/home/$USER:rw" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
ghcr.io/inti-cmnb/kicad5_auto:latest_deps /bin/bash

View File

@ -1,20 +1,30 @@
FROM setsoft/kicad_debian:ki6
FROM ghcr.io/inti-cmnb/kicad6_auto:latest_deps
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad with KiBot and other automation scripts"
LABEL Description="KiCad 6 w/KiBot and other automation scripts"
LABEL org.opencontainers.image.description "KiCad 6 w/KiBot and other automation scripts"
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y install -t bullseye-backports curl && \
apt-get -y install make wget curl rar bzip2 librsvg2-bin && \
apt-get -y install --no-install-recommends imagemagick python3-qrcodegen git poppler-utils && \
curl -s https://api.github.com/repos/INTI-CMNB/KiAuto/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBoM/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/InteractiveHtmlBom/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/PcbDraw/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiCost/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBot/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
# Install all the tools, dependencies are already installed
RUN apt-get update && \
dl_deb.py INTI-CMNB/KiBoM && \
dl_deb.py INTI-CMNB/kicad-git-filters && \
dl_deb.py set-soft/kicost-digikey-api-v3 && \
dl_deb.py hildogjr/KiCost && \
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
dl_deb.py set-soft/pcbnewTransition && \
dl_deb.py INTI-CMNB/KiKit --skip kikit-doc && \
dl_deb.py INTI-CMNB/KiAuto && \
dl_deb.py INTI-CMNB/kidiff && \
dl_deb.py INTI-CMNB/KiBot && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y remove curl wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
ARG iteration
ENV KIBOT_ITERATION=$iteration
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \
echo -n -${KIBOT_ITERATION}_k >> /etc/kiauto_tag && \
kicad_version.py >> /etc/kiauto_tag && \
echo -n _d >> /etc/kiauto_tag && \
cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag

View File

@ -1,2 +1,18 @@
#!/bin/sh
docker build -f Dockerfile -t setsoft/kicad_auto:ki6 .
set -e
. ../iteration.sh
docker build -f Dockerfile --build-arg iteration=${IT} -t ghcr.io/inti-cmnb/kicad6_auto:latest .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'`
TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest kicad_version.py`
TG3=d`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad6_auto:${TG1}-${IT}_${TG2}_${TG3}
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad6_auto:${TG1}
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki6
docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}-${IT}_${TG2}_${TG3}
docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}
docker push ghcr.io/inti-cmnb/kicad_auto:ki6
# Leave the following for the deploy:
#docker tag ghcr.io/inti-cmnb/kicad6_auto:latest setsoft/kicad_auto:ki6
#docker push ghcr.io/inti-cmnb/kicad6_auto:latest
#docker push setsoft/kicad_auto:ki6

2
ki6/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad_auto:ki6 /bin/bash

View File

@ -10,4 +10,4 @@ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
setsoft/kicad_auto:ki6 /bin/bash
ghcr.io/inti-cmnb/kicad_auto:ki6 /bin/bash

18
ki6_pre/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM ghcr.io/inti-cmnb/kicad6_debian:latest
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="Layer used for new dependencies"
LABEL org.opencontainers.image.description "Layer used for new dependencies"
RUN apt-get update && \
echo "Use wget to download some stuff" && \
apt -y install --no-install-recommends wget && \
echo "XLSX Writer 3 fixes some important limitations in URLs (used by KiBoM, KiCost, KiBot, etc.)" && \
wget http://http.us.debian.org/debian/pool/main/x/xlsxwriter/python3-xlsxwriter_3.0.2-2_all.deb && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y remove wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
# Fix for the .deb downloader, should be removed in the next OS iteration
COPY dl_deb.py /usr/bin/

10
ki6_pre/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
cp ../dl_deb.py .
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad6_auto:latest_deps .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest_deps kicad_version.py`
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad6_auto:latest_deps cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad6_auto:latest_deps ghcr.io/inti-cmnb/kicad6_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad6_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad6_auto:latest_deps

2
ki6_pre/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad6_auto:latest_deps /bin/bash

13
ki6_pre/run_shell_same_user.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/home/$USER:/home/$USER:rw" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
ghcr.io/inti-cmnb/kicad6_auto:latest_deps /bin/bash

30
ki7/Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM ghcr.io/inti-cmnb/kicad7_auto:latest_deps
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad 7 w/KiBot and other automation scripts"
LABEL org.opencontainers.image.description "KiCad 7 w/KiBot and other automation scripts"
# Install all the tools, dependencies are already installed
RUN apt-get update && \
dl_deb.py INTI-CMNB/KiBoM && \
dl_deb.py INTI-CMNB/kicad-git-filters && \
dl_deb.py set-soft/kicost-digikey-api-v3 && \
dl_deb.py hildogjr/KiCost && \
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
dl_deb.py set-soft/pcbnewTransition && \
dl_deb.py INTI-CMNB/KiKit --skip kikit-doc && \
dl_deb.py INTI-CMNB/KiAuto && \
dl_deb.py INTI-CMNB/kidiff && \
dl_deb.py INTI-CMNB/KiBot && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
ARG iteration
ENV KIBOT_ITERATION=$iteration
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \
echo -n -${KIBOT_ITERATION}_k >> /etc/kiauto_tag && \
kicad_version.py >> /etc/kiauto_tag && \
echo -n _d >> /etc/kiauto_tag && \
cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag

18
ki7/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
set -e
. ../iteration.sh
docker build -f Dockerfile --build-arg iteration=${IT} -t ghcr.io/inti-cmnb/kicad7_auto:latest .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad7_auto:latest kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'`
TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad7_auto:latest kicad_version.py`
TG3=d`docker run --rm ghcr.io/inti-cmnb/kicad7_auto:latest cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad7_auto:latest ghcr.io/inti-cmnb/kicad7_auto:${TG1}-${IT}_${TG2}_${TG3}
docker tag ghcr.io/inti-cmnb/kicad7_auto:latest ghcr.io/inti-cmnb/kicad7_auto:${TG1}
docker tag ghcr.io/inti-cmnb/kicad7_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki7
docker push ghcr.io/inti-cmnb/kicad7_auto:${TG1}-${IT}_${TG2}_${TG3}
docker push ghcr.io/inti-cmnb/kicad7_auto:${TG1}
docker push ghcr.io/inti-cmnb/kicad_auto:ki7
# Leave the following for the deploy:
#docker tag ghcr.io/inti-cmnb/kicad7_auto:latest setsoft/kicad_auto:ki7
#docker push ghcr.io/inti-cmnb/kicad7_auto:latest
#docker push setsoft/kicad_auto:ki7

2
ki7/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad_auto:ki7 /bin/bash

View File

@ -1,7 +1,7 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
@ -10,4 +10,4 @@ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
setsoft/kicad_auto:latest kicad
ghcr.io/inti-cmnb/kicad_auto:ki7 /bin/bash

18
ki7_pre/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM ghcr.io/inti-cmnb/kicad7_debian:latest
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="Layer used for new dependencies"
LABEL org.opencontainers.image.description "Layer used for new dependencies"
RUN apt-get update && \
echo "Use wget to download some stuff" && \
apt -y install --no-install-recommends wget && \
echo "XLSX Writer 3 fixes some important limitations in URLs (used by KiBoM, KiCost, KiBot, etc.)" && \
wget http://http.us.debian.org/debian/pool/main/x/xlsxwriter/python3-xlsxwriter_3.0.2-2_all.deb && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y remove wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
# Fix for the .deb downloader, should be removed in the next OS iteration
COPY dl_deb.py /usr/bin/

10
ki7_pre/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
cp ../dl_deb.py .
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad7_auto:latest_deps .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad7_auto:latest_deps kicad_version.py`
TG2=d`docker run --rm ghcr.io/inti-cmnb/kicad7_auto:latest_deps cat /etc/debian_version | tr -d '\n'`
docker tag ghcr.io/inti-cmnb/kicad7_auto:latest_deps ghcr.io/inti-cmnb/kicad7_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad7_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad7_auto:latest_deps

2
ki7_pre/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad7_auto:latest_deps /bin/bash

13
ki7_pre/run_shell_same_user.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/home/$USER:/home/$USER:rw" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
ghcr.io/inti-cmnb/kicad7_auto:latest_deps /bin/bash

30
ki8/Dockerfile Normal file
View File

@ -0,0 +1,30 @@
FROM ghcr.io/inti-cmnb/kicad8_auto:latest_deps
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad 8 w/KiBot and other automation scripts"
LABEL org.opencontainers.image.description "KiCad 8 w/KiBot and other automation scripts"
# Install all the tools, dependencies are already installed
RUN apt-get update && \
dl_deb.py INTI-CMNB/KiBoM && \
dl_deb.py INTI-CMNB/kicad-git-filters && \
dl_deb.py set-soft/kicost-digikey-api-v3 && \
dl_deb.py hildogjr/KiCost && \
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
dl_deb.py set-soft/pcbnewTransition && \
dl_deb.py INTI-CMNB/KiKit --skip kikit-doc && \
dl_deb.py INTI-CMNB/KiAuto && \
dl_deb.py INTI-CMNB/kidiff && \
dl_deb.py INTI-CMNB/KiBot && \
apt -y install --no-install-recommends ./*.deb && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old
ARG iteration
ENV KIBOT_ITERATION=$iteration
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \
echo -n -${KIBOT_ITERATION}_k >> /etc/kiauto_tag && \
kicad_version.py >> /etc/kiauto_tag && \
echo -n _d >> /etc/kiauto_tag && \
cat /etc/debian_version | tr -d '\n' >> /etc/kiauto_tag

18
ki8/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
set -e
. ../iteration.sh
docker build -f Dockerfile --build-arg iteration=${IT} -t ghcr.io/inti-cmnb/kicad8_auto:latest .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:latest kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n'`
TG2=k`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:latest kicad_version.py`
TG3=d_sid
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad8_auto:${TG1}-${IT}_${TG2}_${TG3}
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad8_auto:${TG1}
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest ghcr.io/inti-cmnb/kicad_auto:ki8
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1}-${IT}_${TG2}_${TG3}
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1}
docker push ghcr.io/inti-cmnb/kicad_auto:ki8
# Leave the following for the deploy:
#docker tag ghcr.io/inti-cmnb/kicad8_auto:latest setsoft/kicad_auto:ki8
#docker push ghcr.io/inti-cmnb/kicad8_auto:latest
#docker push setsoft/kicad_auto:ki8

2
ki8/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad_auto:ki8 /bin/bash

View File

@ -1,7 +1,7 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
@ -10,4 +10,4 @@ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
setsoft/kicad_auto:ki6 kicad
ghcr.io/inti-cmnb/kicad_auto:ki8 /bin/bash

5
ki8_pre/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM ghcr.io/inti-cmnb/kicad8_debian:latest
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="Layer used for new dependencies"
LABEL org.opencontainers.image.description "Layer used for new dependencies"

10
ki8_pre/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
cp ../dl_deb.py .
docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad8_auto:latest_deps .
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:latest_deps kicad_version.py`
TG2=d_sid
docker tag ghcr.io/inti-cmnb/kicad8_auto:latest_deps ghcr.io/inti-cmnb/kicad8_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad8_auto:${TG1}_${TG2}_deps
docker push ghcr.io/inti-cmnb/kicad8_auto:latest_deps

2
ki8_pre/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it ghcr.io/inti-cmnb/kicad8_auto:latest_deps /bin/bash

13
ki8_pre/run_shell_same_user.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--user $USER_ID:$GROUP_ID \
--env NO_AT_BRIDGE=1 \
--workdir="/home/$USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/home/$USER:/home/$USER:rw" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
ghcr.io/inti-cmnb/kicad8_auto:latest_deps /bin/bash

36
manjaro/Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM manjarolinux/base
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad with KiBot and other automation scripts"
RUN pacman -Syyu --noconfirm && \
pacman -S yay binutils python-pip --noconfirm && \
su builder -c "yay -S --noconfirm rar" && \
pacman -S kicad kicad-library ghostscript gsfonts imagemagick librsvg pandoc texlive-core --noconfirm && \
pacman -S recordmydesktop xdotool xclip libxslt python-psutil python-xvfbwrapper --noconfirm && \
pip install KiAuto && \
pacman -S python-xlsxwriter --noconfirm && \
git clone https://github.com/INTI-CMNB/KiBoM.git && \
cd KiBoM/ && \
pip install . && \
cd .. && \
rm -r KiBoM/ && \
git clone https://github.com/INTI-CMNB/InteractiveHtmlBom.git && \
cd InteractiveHtmlBom/ && \
pip install . && \
cd .. && \
rm -r InteractiveHtmlBom/ && \
pip install KiDiff && \
pacman -S python-numpy python-lxml python-mistune1 python-pybars3 python-wand python-yaml python-pcbnewtransition python-scipy --noconfirm && \
su builder -c "yay -S python-svgpathtools-git --noconfirm" && \
git clone https://github.com/INTI-CMNB/PcbDraw.git && \
cd PcbDraw/ && \
git submodule update --init --recursive && \
git checkout v0.9.0_maintain && \
pip install . && \
cd .. && \
rm -r PcbDraw/ && \
pacman -S python-inflection python-pyopenssl python-tldextract python-dateutil --noconfirm && \
pip install kicost_digikey_api_v3 dependencies && \
pacman -S python-beautifulsoup4 python-tqdm python-validators python-colorama python-pillow --noconfirm && \
pip install kicost && \
pip install kibot

2
manjaro/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker build -f Dockerfile -t setsoft/kicad_auto:manjaro_k6 .

2
manjaro/run_shell.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm -it setsoft/kicad_auto:manjaro_k6 /bin/bash

View File

@ -10,4 +10,4 @@ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home/$USER:/home/$USER:rw" \
setsoft/kicad_auto:latest /bin/bash
setsoft/kicad_auto:manjaro_k6 /bin/bash

View File

@ -1,19 +1,33 @@
FROM setsoft/kicad_debian:nightly
FROM ghcr.io/inti-cmnb/kicad_debian:nightly
MAINTAINER Salvador E. Tropea <set@ieee.org>
LABEL Description="KiCad with KiBot and other automation scripts"
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y install make wget curl rar bzip2 librsvg2-bin && \
apt-get -y install --no-install-recommends imagemagick python3-qrcodegen git poppler-utils && \
curl -s https://api.github.com/repos/INTI-CMNB/KiAuto/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBoM/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/InteractiveHtmlBom/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/PcbDraw/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiCost/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
curl -s https://api.github.com/repos/INTI-CMNB/KiBot/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \
apt-get -y install -t bullseye-backports curl && \
apt-get -y install --no-install-recommends -t bullseye-backports git && \
apt-get -y install make wget curl rar bzip2 librsvg2-bin ghostscript && \
apt-get -y install --no-install-recommends imagemagick python3-qrcodegen poppler-utils && \
dl_deb.py INTI-CMNB/KiAuto && \
dl_deb.py INTI-CMNB/KiBoM && \
dl_deb.py INTI-CMNB/InteractiveHtmlBom && \
dl_deb.py INTI-CMNB/PcbDraw && \
dl_deb.py hildogjr/KiCost && \
dl_deb.py INTI-CMNB/KiBot && \
dl_deb.py set-soft/kicost-digikey-api-v3 && \
dl_deb.py INTI-CMNB/kicad-git-filters && \
dl_deb.py INTI-CMNB/kidiff && \
dl_deb.py set-soft/pcbnewTransition && \
dl_deb.py INTI-CMNB/KiKit --skip kikit-doc && \
apt -y install --no-install-recommends ./*.deb && \
sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<!-- <policy domain="coder" rights="none" pattern="PDF" \/> -->/g' /etc/ImageMagick-6/policy.xml && \
sed -i 's/<policy domain="coder" rights="none" pattern="PS" \/>/<!-- <policy domain="coder" rights="none" pattern="PS" \/> -->/g' /etc/ImageMagick-6/policy.xml && \
apt-get -y remove curl wget && \
apt-get -y autoremove && \
rm /*.deb && \
rm -rf /var/lib/apt/lists/*
# Needed for GitHub seen on git 2.39.1
RUN echo "[safe]" >> /etc/gitconfig && \
echo " directory = *" >> /etc/gitconfig && \
echo '[protocol "file"]' >> /etc/gitconfig && \
echo ' allow = always' >> /etc/gitconfig

2
nightly/build.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker build -f Dockerfile -t setsoft/kicad_auto:nightly .

3
pull.sh Executable file
View File

@ -0,0 +1,3 @@
docker pull ghcr.io/inti-cmnb/kicad_auto:ki5
docker pull ghcr.io/inti-cmnb/kicad_auto:ki6
docker pull ghcr.io/inti-cmnb/kicad_auto:ki7

15
run.sh
View File

@ -1,15 +0,0 @@
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
WORKDIR=../hard
SUBDIR=Conjunto
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:latest /bin/bash -c "cd workdir/$SUBDIR; kiplot"

56
tools/garbage_collector.py Executable file
View File

@ -0,0 +1,56 @@
#!/usr/bin/python3
from datetime import datetime, timezone
import requests
import sys
ORG = 'INTI-CMNB'
PKGS = {'kicad_auto', 'kicad5_auto', 'kicad6_auto', 'kicad7_auto'}
PKG = 'kicad5_auto'
HEADER = {'Accept': 'application/vnd.github+json',
'Authorization': 'Bearer '+sys.argv[1],
'X-GitHub-Api-Version': '2022-11-28'}
def erase(name):
url = f'https://api.github.com/orgs/{ORG}/packages/container/{PKG}/versions/{name}'
r = requests.delete(url, timeout=20, allow_redirects=True, headers=HEADER)
if r.status_code != 204:
print(f'Error: {r.status_code} ****')
deleted = 0
for PKG in PKGS:
url = f'https://api.github.com/orgs/{ORG}/packages/container/{PKG}/versions'
page = 1
received = 100
vers = []
while received == 100:
r = requests.get(url, timeout=20, allow_redirects=True, headers=HEADER, params={'per_page': 100, 'page': page})
assert r.status_code == 200
page = page+1
res = r.json()
vers.extend(res)
received = len(res)
now = datetime.now(timezone.utc)
for v in vers:
# How old is this version?
date_str = v["updated_at"]
parsed_date = datetime.fromisoformat(date_str.replace('Z', '+00:00'))
days_ago = (now - parsed_date).days
# Leave anything with 15 or less days
if days_ago < 15:
continue
# Analyze the tags
tags = v["metadata"]["container"]["tags"]
if len(tags) == 0:
print(f"Deleting {v['html_url']} UNTAGGED {days_ago} days ago")
erase(v["id"])
deleted += 1
elif len(tags) == 1 and tags[0].startswith('dev_') and len(tags[0]) > 6:
# Is dev_* and isn't tagged as the last dev
print(f"Deleting {v['html_url']} {tags[0]} {days_ago} days ago")
erase(v["id"])
deleted += 1
print(f"Deleted {deleted} versions")