-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[skip-ci] Packit/TMT: Run gating tests #1960
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
notifications: &copr_build_failure_notification | ||
failure_comment: | ||
message: "Ephemeral COPR build failed. @containers/packit-build please check." | ||
targets: | ||
targets: &fedora_copr_targets | ||
- fedora-development-x86_64 | ||
- fedora-development-aarch64 | ||
- fedora-latest-x86_64 | ||
|
@@ -43,7 +43,7 @@ jobs: | |
enable_net: true | ||
|
||
- job: copr_build | ||
trigger: pull_request | ||
trigger: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this an intentional part of the PR? It’s not obvious to me that changes to tests should affect whether we test building. |
||
packages: [skopeo-eln] | ||
notifications: *copr_build_failure_notification | ||
targets: | ||
|
@@ -59,7 +59,7 @@ jobs: | |
trigger: pull_request | ||
packages: [skopeo-centos] | ||
notifications: *copr_build_failure_notification | ||
targets: | ||
targets: ¢os_copr_targets | ||
- centos-stream-9-x86_64 | ||
- centos-stream-9-aarch64 | ||
- centos-stream-10-x86_64 | ||
|
@@ -88,6 +88,39 @@ jobs: | |
project: podman-next | ||
enable_net: true | ||
|
||
# Tests on Fedora | ||
- job: tests | ||
trigger: pull_request | ||
packages: [skopeo-fedora] | ||
notifications: &test_failure_notification | ||
failure_comment: | ||
message: "Tests failed. @containers/packit-build please check." | ||
tmt_plan: /plans/upstream | ||
targets: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to self: Per https://packit.dev/docs/configuration/upstream/tests#required-parameters , There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe worth a comment in the file? Especially when it differs from the build job semantics. |
||
- fedora-development | ||
- fedora-latest | ||
- fedora-latest-stable | ||
- fedora-40 | ||
tf_extra_params: | ||
environments: | ||
- artifacts: | ||
- type: repository-file | ||
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/fedora-$releasever/rhcontainerbot-podman-next-fedora-$releasever.repo | ||
|
||
# Tests on CentOS Stream | ||
- job: tests | ||
trigger: pull_request | ||
packages: [skopeo-centos] | ||
notifications: *test_failure_notification | ||
targets: | ||
- centos-stream-9 | ||
- centos-stream-10 | ||
tf_extra_params: | ||
environments: | ||
- artifacts: | ||
- type: repository-file | ||
id: https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/repo/centos-stream-$releasever/rhcontainerbot-podman-next-centos-stream-$releasever.repo | ||
|
||
# Sync to Fedora | ||
- job: propose_downstream | ||
trigger: release | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,12 @@ test-integration: | |
|
||
|
||
# Intended for CI, assumed to be running in quay.io/libpod/skopeo_cidev container. | ||
ifdef SKOPEO_BINARY | ||
$(info Skipping build as SKOPEO_BINARY is specified) | ||
test-integration-local: | ||
else | ||
test-integration-local: bin/skopeo | ||
endif | ||
Comment on lines
+205
to
+210
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This suggests that But the Go test code invoked by How is this intended to work? |
||
hack/warn-destructive-tests.sh | ||
hack/test-integration.sh | ||
|
||
|
@@ -228,7 +233,7 @@ test-unit: | |
$(CONTAINER_RUN) $(MAKE) test-unit-local | ||
|
||
validate: | ||
$(CONTAINER_RUN) $(MAKE) validate-local | ||
$(CONTAINER_RUN) $(MAKE) tools validate-local | ||
|
||
# This target is only intended for development, e.g. executing it from an IDE. Use (make test) for CI or pre-release testing. | ||
test-all-local: validate-local validate-docs test-unit-local | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
set -exo pipefail | ||
|
||
make PREFIX=/usr install | ||
if [[ ! -f /usr/bin/skopeo ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICS this introduces a risk that we are going to test some pre-existing system binary, not the one we just built (or, see elsewhere about |
||
make PREFIX=/usr install | ||
fi | ||
|
||
echo "cd ./integration;" go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} | ||
cd ./integration | ||
go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} | ||
go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require: | ||
- make | ||
- podman-docker | ||
|
||
/unit: | ||
tag: upstream | ||
summary: Run unit test | ||
test: make -C ../.. test-unit | ||
|
||
/validate: | ||
tag: upstream | ||
summary: Run validate test | ||
test: make -C ../.. tools validate |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require: | ||
- golang | ||
- make | ||
- podman | ||
- skopeo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this requiring some other Skopeo binary than the one we are testing? Or does that guarantee to use the one from … and if this is the one we should be testing, how does that |
||
|
||
duration: 30m | ||
|
||
tag: [ upstream, downstream ] | ||
summary: Run integration tests | ||
test: make -C ../.. test-integration |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
discover: | ||
how: fmf | ||
execute: | ||
how: tmt | ||
|
||
/upstream: | ||
summary: Run tests on upstream PRs | ||
discover+: | ||
filter: tag:upstream | ||
adjust+: | ||
enabled: false | ||
when: initiator is not defined or initiator != packit | ||
|
||
/downstream: | ||
summary: Run tests on bodhi / errata and dist-git PRs | ||
discover+: | ||
filter: tag:downstream | ||
adjust+: | ||
enabled: false | ||
when: initiator == packit |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ BuildRequires: ostree-devel | |
BuildRequires: glib2-devel | ||
BuildRequires: make | ||
BuildRequires: shadow-utils-subid-devel | ||
Requires: containers-common >= 4:1-21 | ||
Requires: containers-common | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this related to the rest of the PR? |
||
|
||
%description | ||
Command line utility to inspect images and repositories directly on Docker | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, and
centos_copr_targets
, seem to be unused. Is that intentional?