From 8d0f77d34e58998a2dbc0fe04d22c0140a60c38c Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 6 Dec 2023 13:23:25 -0300 Subject: [PATCH] Added experimental meta data to the dev images See INTI-CMNB/KiBot#527 --- iteration.sh | 1 + ki5/Dockerfile | 9 +++++++++ ki5/build.sh | 4 ++-- ki6/Dockerfile | 9 +++++++++ ki6/build.sh | 4 ++-- ki7/Dockerfile | 9 +++++++++ ki7/build.sh | 4 ++-- 7 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 iteration.sh diff --git a/iteration.sh b/iteration.sh new file mode 100644 index 0000000..a69e8f3 --- /dev/null +++ b/iteration.sh @@ -0,0 +1 @@ +IT=2 \ No newline at end of file diff --git a/ki5/Dockerfile b/ki5/Dockerfile index d2a65a0..2fe0923 100644 --- a/ki5/Dockerfile +++ b/ki5/Dockerfile @@ -17,3 +17,12 @@ RUN apt-get update && \ 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 diff --git a/ki5/build.sh b/ki5/build.sh index 815e9bf..c9020e9 100755 --- a/ki5/build.sh +++ b/ki5/build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad5_auto:latest . -IT=1 +. ../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'` diff --git a/ki6/Dockerfile b/ki6/Dockerfile index ce33072..4b82662 100644 --- a/ki6/Dockerfile +++ b/ki6/Dockerfile @@ -19,3 +19,12 @@ RUN apt-get update && \ 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 diff --git a/ki6/build.sh b/ki6/build.sh index 443d46d..2e4c339 100755 --- a/ki6/build.sh +++ b/ki6/build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad6_auto:latest . -IT=1 +. ../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'` diff --git a/ki7/Dockerfile b/ki7/Dockerfile index f809bf6..90f5a79 100644 --- a/ki7/Dockerfile +++ b/ki7/Dockerfile @@ -19,3 +19,12 @@ RUN apt-get update && \ 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 diff --git a/ki7/build.sh b/ki7/build.sh index c7da1e9..75f5e28 100755 --- a/ki7/build.sh +++ b/ki7/build.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -docker build -f Dockerfile -t ghcr.io/inti-cmnb/kicad7_auto:latest . -IT=1 +. ../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'`