diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 000000000..a1ec20671 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,34 @@ +--- +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +jobs: + # All tests specified in the `/plans/` subdir + # Podman build test for Fedora and CentOS Stream + - job: tests + trigger: pull_request + #notifications: + #failure_comment: + # message: "podman e2e tests failed. @containers/packit-build please check." + targets: &pr_test_targets + - fedora-all + - epel-9 + - epel-8 + identifier: podman_build_test + skip_build: true + tmt_plan: "/plans/podman_build_test" + + # Podman build test for RHEL + #- job: tests + # trigger: pull_request + # use_internal_tf: true + # # notifications: + # #failure_comment: + # # message: "podman e2e tests failed on RHEL. @containers/packit-build please check." + # targets: &pr_test_targets_rhel + # epel-9-x86_64: + # distros: [RHEL-9.2.0-Nightly] + # epel-8-x86_64: + # distros: [RHEL-8.10.0-Nightly] + # identifier: podman_e2e_test_internal + # tmt_plan: "/plans/podman_e2e_test" diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 000000000..9de76cab1 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,46 @@ +# tmt does provide the `adjust` attribute to manage distro conditionals, but +# the bash way has been rather convenient to read, manage and copy-paste +# Ref: https://tmt.readthedocs.io/en/stable/spec/core.html#adjust +prepare: + - how: shell + script: | + RHEL_RELEASE=$(rpm --eval %{?rhel}) + ARCH=$(uname -m) + if [ $RHEL_RELEASE -eq 8 ]; then + echo "Disabling container-tools module..." + dnf -y module disable container-tools + fi + if [ -f /etc/centos-release ]; then + echo "Installing epel-release..." + dnf -y install epel-release + elif [ $RHEL_RELEASE -ge 8 ]; then + echo "Installing epel-release..." + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$RHEL_RELEASE.noarch.rpm + echo "Enabling epel repo..." + dnf config-manager --set-enabled epel + cat /etc/yum.repos.d/epel.repo + fi + dnf -y copr enable rhcontainerbot/podman-next + dnf config-manager --save --setopt="*:rhcontainerbot:podman-next.priority=5" + - how: install + package: + - golang + +/podman_build_test: + summary: Run Podman build test + execute: + how: tmt + script: | + echo "Checking /etc/redhat-release..." + cat /etc/redhat-release + echo "Checking installed versions of required packages..." + echo "Cloning podman..." + git clone https://github.com/containers/podman + cd podman + echo "Installing dependencies..." + dnf -y builddep rpm/podman.spec + echo "Vendoring HEAD into podman..." + go mod edit -require github.com/containers/common@HEAD + make vendor + echo "Building podman..." + make binaries