Skip to content

Commit

Permalink
Merge pull request #2422 from reubenmiller/chore-update-system-test-i…
Browse files Browse the repository at this point in the history
…mage

chore: update dev and system test images
  • Loading branch information
reubenmiller authored Nov 7, 2023
2 parents 8404726 + cfcce1e commit 9b1ce24
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 16 deletions.
21 changes: 16 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See here for image contents: /~https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/rust/.devcontainer/base.Dockerfile
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
ARG VARIANT="bullseye"
ARG VARIANT="bookworm"
FROM mcr.microsoft.com/devcontainers/rust:1-${VARIANT}

# [Optional] Uncomment this section to install additional packages.
Expand All @@ -22,10 +22,21 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
docker \
python3 \
python3-pip \
python3-venv \
# tedge dependencies
python3-venv

# tedge dependencies
# Install more recent version of mosquitto >= 2.0.18 from debian sid to avoid mosquitto following bugs:
# The mosquitto repo can't be used as it does not included builds for arm64/aarch64 (only amd64 and armhf)
# * /~https://github.com/eclipse/mosquitto/issues/2604 (2.0.11)
# * /~https://github.com/eclipse/mosquitto/issues/2634 (2.0.15)
RUN sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian sid main' > /etc/apt/sources.list.d/debian-sid.list" \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
mosquitto \
mosquitto-clients
mosquitto-clients \
# Remove sid afterwards to prevent unexpected packages from being installed
&& rm -f /etc/apt/sources.list.d/debian-sid.list \
&& apt-get update

# Install gh utility
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
Expand Down Expand Up @@ -55,7 +66,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin/

# Update python deps
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade pip --break-system-packages

# Delete the dummy systemctl command added by the base image
RUN rm -f /usr/local/bin/systemctl
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: .
dockerfile: Dockerfile
args:
VARIANT: bullseye
VARIANT: bookworm
environment:
- DOCKER_HOST=unix:///opt/run/docker.sock

Expand Down
2 changes: 1 addition & 1 deletion docs/src/contribute/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can use any OS to build from source (below has been tested on Ubuntu, but we

Our recommended setup and required tools are:

* Ubuntu 20.04 or Debian 10.9 (Buster)
* Ubuntu 20.04 or Debian 12 (Bookworm)
* git
* Rust toolchain

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
robotframework-devicelibrary[docker] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.10.2
robotframework-devicelibrary[docker] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.11.1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
robotframework-devicelibrary[local] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.10.2
robotframework-devicelibrary[local] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.11.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
robotframework-devicelibrary[ssh] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.10.2
robotframework-devicelibrary[ssh] @ git+/~https://github.com/reubenmiller/robotframework-devicelibrary.git@1.11.1
robotframework-sshlibrary~=3.8.0
19 changes: 15 additions & 4 deletions tests/images/debian-systemd/debian-systemd.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:11-slim
FROM debian:12-slim

# Install
RUN apt-get -y update \
Expand All @@ -13,14 +13,25 @@ RUN apt-get -y update \
dbus \
systemd-sysv \
ssh \
mosquitto \
mosquitto-clients \
vim.tiny \
nginx \
netcat \
netcat-openbsd \
iputils-ping \
net-tools

# Install more recent version of mosquitto >= 2.0.18 from debian sid to avoid mosquitto following bugs:
# The mosquitto repo can't be used as it does not included builds for arm64/aarch64 (only amd64 and armhf)
# * /~https://github.com/eclipse/mosquitto/issues/2604 (2.0.11)
# * /~https://github.com/eclipse/mosquitto/issues/2634 (2.0.15)
RUN sh -c "echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian sid main' > /etc/apt/sources.list.d/debian-sid.list" \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
mosquitto \
mosquitto-clients \
# Remove sid afterwards to prevent unexpected packages from being installed
&& rm -f /etc/apt/sources.list.d/debian-sid.list \
&& apt-get update

# Remove unnecessary systemd services
RUN rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
Expand Down
4 changes: 2 additions & 2 deletions tests/images/debian-systemd/files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,14 @@ configure_repos() {
# Use a fixed distribution string to avoid guess work, and it does not really matter anyway
curl -1sLf \
"https://dl.cloudsmith.io/public/thinedge/${REPO}/setup.deb.sh" \
| distro=raspbian version=11 codename=bullseye sudo -E bash
| distro=raspbian version=11 codename=bookworm sudo -E bash
else
echo "Repo (channel=${REPO_CHANNEL}) is already configured"
fi
else
# TODO: Support non-bash environments (but the cloudsmith script only supports bash)
fail "Bash is missing. Currently this script requires bash to setup the apt repos"
# deb [signed-by=/usr/share/keyrings/thinedge-tedge-release-archive-keyring.gpg] https://dl.cloudsmith.io/public/thinedge/tedge-release/deb/raspbian bullseye main
# deb [signed-by=/usr/share/keyrings/thinedge-tedge-release-archive-keyring.gpg] https://dl.cloudsmith.io/public/thinedge/tedge-release/deb/raspbian bookworm main
fi
}

Expand Down

1 comment on commit 9b1ce24

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
356 0 3 356 100 1h6m53.682s

Please sign in to comment.