Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(ci): keep packages cache during plugins testing #5321

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2,7 +2,7 @@

FROM ${REGISTRY_URL}/debian:bookworm

ENV DEBIAN_FRONTEND noninteractive

Check warning on line 5 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/

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,9 +15,13 @@

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 @@ -2,7 +2,7 @@

FROM ${REGISTRY_URL}/debian:bullseye

ENV DEBIAN_FRONTEND noninteractive

Check warning on line 5 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 5 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/

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,9 +15,13 @@

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 @@ -2,7 +2,7 @@

FROM ${REGISTRY_URL}/ubuntu:jammy

ENV DEBIAN_FRONTEND noninteractive

Check warning on line 5 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/

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,9 +15,13 @@

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