forked from johnbeard/kiplot
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI/CD][Added][KiCad 8] dev images creation
- Loading branch information
Showing
5 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM ghcr.io/inti-cmnb/kicad_auto:ki8 | ||
MAINTAINER Salvador E. Tropea <[email protected]> | ||
LABEL Description="KiCad 7 with KiBot and other automation scripts" | ||
|
||
RUN dpkg --remove kicost kibot && \ | ||
apt-get update && \ | ||
apt-get -y install --no-install-recommends curl unzip python3-pip && \ | ||
curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/dev --output pp.zip && \ | ||
unzip pp.zip && \ | ||
pip3 install --break-system-packages --no-compile KiBot-dev/ && \ | ||
rm -rf KiBot-dev pp.zip && \ | ||
curl https://codeload.github.com/hildogjr/KiCost/zip/refs/heads/master --output pp.zip && \ | ||
unzip pp.zip && \ | ||
pip3 install --break-system-packages KiCost-master/ && \ | ||
apt-get -y remove curl unzip python3-pip && \ | ||
rm -rf KiCost-master pp.zip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# kidiff depends on KiAuto | ||
# dpkg --remove kiauto && \ | ||
# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ | ||
# unzip pp.zip && \ | ||
# pip3 install --break-system-packages KiAuto-master/ && \ | ||
# rm -rf KiAuto-master/ pp.zip && \ | ||
|
||
ARG repo_hash | ||
ENV KIBOT_REPO_HASH=$repo_hash | ||
|
||
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \ | ||
echo -n -${KIBOT_REPO_HASH}_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
set -e | ||
HASH=`git log --pretty=format:%h -1 | tr -d '\n'` | ||
docker build -f Dockerfile --build-arg repo_hash=${HASH} -t ghcr.io/inti-cmnb/kicad8_auto:dev . | ||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto:dev 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:dev kicad_version.py` | ||
TG3=d_sid | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad8_auto:dev_${TG1}-${HASH}_${TG2}_${TG3} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad_auto:dev_k8_${TG1}-${HASH}_${TG2}_${TG3} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto:dev ghcr.io/inti-cmnb/kicad_auto:dev_k8 | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:dev_${TG1}-${HASH}_${TG2}_${TG3} | ||
docker push ghcr.io/inti-cmnb/kicad_auto:dev_k8_${TG1}-${HASH}_${TG2}_${TG3} | ||
docker push ghcr.io/inti-cmnb/kicad_auto:dev_k8 | ||
docker push ghcr.io/inti-cmnb/kicad8_auto:dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ghcr.io/inti-cmnb/kicad_auto_test:ki8 | ||
MAINTAINER Salvador E. Tropea <[email protected]> | ||
LABEL Description="KiCad 8 with KiBot and other automation scripts" | ||
|
||
RUN dpkg --remove kicost kibot && \ | ||
apt-get update && \ | ||
curl https://codeload.github.com/INTI-CMNB/KiBot/zip/refs/heads/dev --output pp.zip && \ | ||
unzip pp.zip && \ | ||
pip3 install --break-system-packages --no-compile KiBot-dev/ && \ | ||
rm -rf KiBot-dev pp.zip && \ | ||
curl https://codeload.github.com/hildogjr/KiCost/zip/refs/heads/master --output pp.zip && \ | ||
unzip pp.zip && \ | ||
pip3 install --break-system-packages KiCost-master/ && \ | ||
rm -rf KiCost-master pp.zip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# kidiff depends on KiAuto | ||
# dpkg --remove kiauto && \ | ||
# curl https://codeload.github.com/INTI-CMNB/KiAuto/zip/refs/heads/master --output pp.zip && \ | ||
# unzip pp.zip && \ | ||
# pip3 install --break-system-packages KiAuto-master/ && \ | ||
# rm -rf KiAuto-master/ pp.zip && \ | ||
|
||
ARG repo_hash | ||
ENV KIBOT_REPO_HASH=$repo_hash | ||
ENV KICAD_AUTO_FULL=1 | ||
|
||
RUN kibot --version | sed 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/' | tr -d '\n' > /etc/kiauto_tag && \ | ||
echo -n -${KIBOT_REPO_HASH}_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 && \ | ||
echo -n _b >> /etc/kiauto_tag && \ | ||
blender --version | head -n 1 | tr -d 'Blender ' >> /etc/kiauto_tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
set -e | ||
export HASH=`git log --pretty=format:%h -1 | tr -d '\n'` | ||
docker build -f Dockerfile --build-arg repo_hash=${HASH} -t ghcr.io/inti-cmnb/kicad8_auto_full:dev . | ||
TG1=`docker run --rm ghcr.io/inti-cmnb/kicad8_auto_full:dev 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_full:dev kicad_version.py` | ||
TG3=d_sid | ||
TG4=b`docker run --rm ghcr.io/inti-cmnb/kicad8_auto_full:dev /bin/bash -c "blender --version | head -n 1 | tr -d 'Blender '"` | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad8_auto_full:dev_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad_auto_full:dev_k8_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} | ||
docker tag ghcr.io/inti-cmnb/kicad8_auto_full:dev ghcr.io/inti-cmnb/kicad_auto_full:dev_k8 | ||
docker push ghcr.io/inti-cmnb/kicad8_auto_full:dev_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} | ||
docker push ghcr.io/inti-cmnb/kicad_auto_full:dev_k8_${TG1}-${HASH}_${TG2}_${TG3}_${TG4} | ||
docker push ghcr.io/inti-cmnb/kicad_auto_full:dev_k8 | ||
docker push ghcr.io/inti-cmnb/kicad8_auto_full:dev |