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..7a76596ab --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,14 @@ +jobs: + # All tests specified in the `/plans/` subdir + - job: tests + trigger: pull_request + #notifications: + #failure_comment: + # message: "podman build test failed. @containers/packit-build please check." + targets: + - fedora-rawhide-x86_64 + - fedora-rawhide-aarch64 + skip_build: true + enable_net: true + identifier: podman_build + tmt_plan: "/contrib/tmtplans/podman_build_test" diff --git a/contrib/tmtplans/.main.fmf.swp b/contrib/tmtplans/.main.fmf.swp new file mode 100644 index 000000000..d403868f4 Binary files /dev/null and b/contrib/tmtplans/.main.fmf.swp differ diff --git a/contrib/tmtplans/buildah_build_test.sh b/contrib/tmtplans/buildah_build_test.sh new file mode 100644 index 000000000..d1d5a858c --- /dev/null +++ b/contrib/tmtplans/buildah_build_test.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -eox pipefail + +rpm -q golang + +if [ -f /etc/fedora-release ]; then + export TMPDIR=/var/tmp +fi + +git clone https://github.com/containers/podman + +cd podman +dnf -y builddep rpm/podman.spec + +go mod edit -replace github.com/containers/common=../ +make vendor +cat go.mod + +git add vendor/ +git config --global user.email "you@example.com" +git config --global user.name "Your Name" + +make rpm diff --git a/contrib/tmtplans/main.fmf b/contrib/tmtplans/main.fmf new file mode 100644 index 000000000..40f61cc26 --- /dev/null +++ b/contrib/tmtplans/main.fmf @@ -0,0 +1,12 @@ +prepare: + - how: install + package: + - git-core + - golang + - rpmdevtools + +/podman_build_test: + summary: Build Podman + execute: + how: tmt + script: bash ./contrib/tmtplans/podman_build_test.sh diff --git a/contrib/tmtplans/podman_build_test.sh b/contrib/tmtplans/podman_build_test.sh new file mode 100644 index 000000000..4269d104a --- /dev/null +++ b/contrib/tmtplans/podman_build_test.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -exo pipefail + +rpm -q golang + +#if [ -f /etc/fedora-release ]; then +# export TMPDIR=/var/tmp +#fi + +# Navigate to parent dir of default working dir +cd .. + +# Clone podman +git clone https://github.com/containers/podman + +cd podman +dnf -y builddep rpm/podman.spec + +# Vendor c/common from PR +# TMT_TREE points to the default working dir +go mod edit -replace github.com/containers/common=$TMT_TREE +make vendor +cat go.mod + +make