Skip to content

Commit

Permalink
enh(ci): keep packages cache during plugins testing (#5321)
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret authored Dec 9, 2024
1 parent 0135299 commit 14b098c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-bookworm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ EOF
ENV LANG en_US.utf8

Check warning on line 18 in .github/docker/testing/Dockerfile.testing-plugins-bookworm

View workflow job for this annotation

GitHub Actions / create-and-push-docker (ubuntu-24.04, bookworm, bookworm)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN bash -e <<EOF

# Avoid apt to clean packages cache directory
rm -f /etc/apt/apt.conf.d/docker-clean

apt-get update
# Install Robotframework
apt-get install -y python3-dev python3-pip
Expand Down
4 changes: 4 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ EOF
ENV LANG en_US.utf8

Check warning on line 18 in .github/docker/testing/Dockerfile.testing-plugins-bullseye

View workflow job for this annotation

GitHub Actions / create-and-push-docker (ubuntu-24.04, bullseye, bullseye)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 18 in .github/docker/testing/Dockerfile.testing-plugins-bullseye

View workflow job for this annotation

GitHub Actions / create-and-push-docker (self-hosted, collect-arm64, bullseye, bullseye-arm64)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN bash -e <<EOF

# Avoid apt to clean packages cache directory
rm -f /etc/apt/apt.conf.d/docker-clean

apt-get update
# Install Robotframework
apt-get install -y python3 python3-dev python3-pip
Expand Down
4 changes: 4 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-jammy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ EOF
ENV LANG en_US.utf8

Check warning on line 18 in .github/docker/testing/Dockerfile.testing-plugins-jammy

View workflow job for this annotation

GitHub Actions / create-and-push-docker (ubuntu-24.04, jammy, jammy)

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN bash -e <<EOF

# Avoid apt to clean packages cache directory
rm -f /etc/apt/apt.conf.d/docker-clean

apt-get update
# Install Robotframework
apt-get install -y python3 python3-dev python3-pip
Expand Down
8 changes: 4 additions & 4 deletions .github/scripts/test-all-plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def install_plugin(plugin, archi):
"apt-get install -o 'Binary::apt::APT::Keep-Downloaded-Packages=1;' -y ./" + plugin.lower() + "*.deb",
shell=True, check=False, stderr=subprocess.STDOUT, stdout=outfile)).returncode
elif archi == "rpm":
outfile.write("dnf install -y ./" + plugin + "*.rpm\n")
output_status = (subprocess.run("dnf install -y ./" + plugin + "*.rpm", shell=True, check=False,
outfile.write("dnf install --setopt=keepcache=True -y ./" + plugin + "*.rpm\n")
output_status = (subprocess.run("dnf install --setopt=keepcache=True -y ./" + plugin + "*.rpm", shell=True, check=False,
stderr=subprocess.STDOUT, stdout=outfile)).returncode
else:
print(f"Unknown architecture, expected deb or rpm, got {archi}. Exiting.")
Expand All @@ -95,8 +95,8 @@ def remove_plugin(plugin, archi):
# 'autoremove', contrary to 'remove' all dependancy while removing the original package.

elif archi == "rpm":
outfile.write("dnf remove -y " + plugin + "\n")
output_status = (subprocess.run("dnf remove -y " + plugin, shell=True, check=False,
outfile.write("dnf remove --setopt=keepcache=True -y " + plugin + "\n")
output_status = (subprocess.run("dnf remove --setopt=keepcache=True -y " + plugin, shell=True, check=False,
stderr=subprocess.STDOUT, stdout=outfile)).returncode
else:
print(f"Unknown architecture, expected deb or rpm, got {archi}. Exiting.")
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-builder-testing-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ jobs:
fail-fast: false
matrix:
include:
- runner: ubuntu-22.04
- runner: ubuntu-24.04
dockerfile: alma8
image: alma8
- runner: ubuntu-22.04
- runner: ubuntu-24.04
dockerfile: alma9
image: alma9
- runner: ubuntu-22.04
- runner: ubuntu-24.04
dockerfile: bullseye
image: bullseye
- runner: ["self-hosted", "collect-arm64"]
dockerfile: bullseye
image: bullseye-arm64
- runner: ubuntu-22.04
- runner: ubuntu-24.04
dockerfile: bookworm
image: bookworm
- runner: ubuntu-22.04
- runner: ubuntu-24.04
dockerfile: jammy
image: jammy

Expand Down

0 comments on commit 14b098c

Please sign in to comment.