Skip to content

Commit

Permalink
Packit: Run gating tests
Browse files Browse the repository at this point in the history
This commit will run Skopeo's gating tests using Packit and TMT.

Signed-off-by: Lokesh Mandvekar <[email protected]>
  • Loading branch information
lsm5 committed Oct 13, 2023
1 parent d9c2568 commit 49952d4
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 17 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
74 changes: 57 additions & 17 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ srpm_build_deps:
- make

jobs:
- job: copr_build
trigger: pull_request
notifications:
failure_comment:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
enable_net: true
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- fedora-eln-x86_64
- fedora-eln-aarch64
- centos-stream+epel-next-8-x86_64
- centos-stream+epel-next-8-aarch64
- centos-stream+epel-next-9-x86_64
- centos-stream+epel-next-9-aarch64
additional_repos:
- "copr://rhcontainerbot/podman-next"
#- job: copr_build
# trigger: pull_request
#notifications:
#failure_comment:
# message: "Ephemeral COPR build failed. @containers/packit-build please check."
# enable_net: true
#targets:
#- fedora-rawhide-x86_64
#- fedora-all-x86_64
#- fedora-all-aarch64
#- fedora-eln-x86_64
#- fedora-eln-aarch64
# - epel-8-x86_64
#- epel-8-aarch64
#- epel-9-x86_64
#- epel-9-aarch64
#additional_repos:
# - "copr://rhcontainerbot/podman-next"

# Run on commit to main branch
- job: copr_build
Expand All @@ -42,6 +43,45 @@ jobs:
project: podman-next
enable_net: true

# Validate test
- job: tests
trigger: pull_request
skip_build: true
targets:
# Only need to test on one environment
- fedora-latest-stable-x86_64

# System tests
- job: tests
trigger: pull_request
targets: &test_targets
- fedora-rawhide-x86_64
#- fedora-all-x86_64
#- fedora-all-aarch64
#- epel-8-x86_64
#- epel-8-aarch64
#- epel-9-x86_64
#- epel-9-aarch64
skip_build: true
identifier: system_test
tmt_plan: "/plans/system_test"

#RHEL tests blocked on https://github.com/packit/packit-service/issues/2028
#- job: tests
#trigger: pull_request
#use_internal_tf: true
#targets: &test_targets_rhel
#epel-8-x86_64:
# distros: [RHEL-8.10.0-Nightly]
#epel-8-aarch64:
# distros: [RHEL-8.10.0-Nightly]
#epel-9-x86_64:
# distros: [RHEL-9.4.0-Nightly]
#epel-9-aarch64:
# distros: [RHEL-9.4.0-Nightly]
#identifier: system_test_internal
#tmt_plan: "/plans/system_test"

- job: propose_downstream
trigger: release
update_release: false
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@ test-system:
$(CONTAINER_RUNTIME) unshare rm -rf $$DTEMP; # This probably doesn't work with Docker, oh well, better than nothing... \
exit $$rc

# The SKOPEO_BINARY envvar is used for running system tests with a prebuilt skopeo binary.
ifdef SKOPEO_BINARY
$(info Skipping build as SKOPEO_BINARY is specified)
test-system-local:
else
# Intended for CI, assumed to already be running in quay.io/libpod/skopeo_cidev container.
test-system-local: bin/skopeo
endif
hack/warn-destructive-tests.sh
hack/test-system.sh

Expand Down
19 changes: 19 additions & 0 deletions plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
prepare:
how: install
package:
- bats
- httpd-tools
- make
- podman-docker

/validate:
summary: Validate code
execute:
how: tmt
script: make validate

/system_test:
summary: Run system tests
execute:
how: tmt
script: make test-system

0 comments on commit 49952d4

Please sign in to comment.