Skip to content

Commit

Permalink
TMT: revdep podman build test
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
  • Loading branch information
lsm5 and cevich committed Mar 15, 2024
1 parent 8d708ea commit 07b3064
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
14 changes: 14 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -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"
Binary file added contrib/tmtplans/.main.fmf.swp
Binary file not shown.
24 changes: 24 additions & 0 deletions contrib/tmtplans/buildah_build_test.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions contrib/tmtplans/main.fmf
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions contrib/tmtplans/podman_build_test.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 07b3064

Please sign in to comment.