From 07b306446dd884a5722b34a3b65abf86579d6032 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 11 Mar 2024 19:22:42 +0530 Subject: [PATCH] TMT: revdep podman build test Co-authored-by: Chris Evich Signed-off-by: Lokesh Mandvekar --- .fmf/version | 1 + .packit.yaml | 14 +++++++++++++ contrib/tmtplans/.main.fmf.swp | Bin 0 -> 12288 bytes contrib/tmtplans/buildah_build_test.sh | 24 +++++++++++++++++++++++ contrib/tmtplans/main.fmf | 12 ++++++++++++ contrib/tmtplans/podman_build_test.sh | 26 +++++++++++++++++++++++++ 6 files changed, 77 insertions(+) create mode 100644 .fmf/version create mode 100644 .packit.yaml create mode 100644 contrib/tmtplans/.main.fmf.swp create mode 100644 contrib/tmtplans/buildah_build_test.sh create mode 100644 contrib/tmtplans/main.fmf create mode 100644 contrib/tmtplans/podman_build_test.sh 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 0000000000000000000000000000000000000000..d403868f45ad9eaec4755399866c6ddcdc54d7e6 GIT binary patch literal 12288 zcmeI&Jx;?g7zSXMnV$j|Ffcc1K@4PMV*s(hS~-c^TEuZ=yZkJ4W8(rKaR;uz#sSzE zIRa8wzCeiU>VjV5EC$+vtNJvPSA4VF25SeE}A z1K|eB3N38pkB5DwTz~TaH>|npsF7Myl-Qn9?7mIJjoe+Qk1Rwwb2tWV=5P-na3;3eJM)Vdd z^_#5LbK}okFEK#?0uX=z1Rwwb2tWV=5P$##Ah3i2B4zA-ow3agdU*Q(fAaf(OzSVo z2jz|ON_nO{Q64B6rAs-ZlzW>L3|Ml<%Z>cJI)#NZ zr$y}duokz4PUW>XCUaBOzM=m3{&Ye4R${EIONB_TM8E#t7O$R3<<5&NV+D2L3rp92 E0Dz%=oB#j- literal 0 HcmV?d00001 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