From deaa412f8a4c1065e1535f7718001405c4626431 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 Signed-off-by: Lokesh Mandvekar --- .fmf/version | 1 + .packit.yaml | 14 ++++++++++++++ plans/main.fmf | 12 ++++++++++++ plans/podman_build_test.sh | 24 ++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 .fmf/version create mode 100644 .packit.yaml create mode 100644 plans/main.fmf create mode 100644 plans/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..8fdc32a2a --- /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: "/plans/podman_build_test" diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 000000000..8784749a7 --- /dev/null +++ b/plans/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 ./plans/podman_build_test.sh diff --git a/plans/podman_build_test.sh b/plans/podman_build_test.sh new file mode 100644 index 000000000..fc9736afc --- /dev/null +++ b/plans/podman_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" +git commit -am 'add vendored files' +make rpm