-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a test to vendor HEAD into podman and check if podman builds successfully. Signed-off-by: Lokesh Mandvekar <[email protected]>
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |