cirrus.yml: add CI:ALL mode to force all tests

Now that we have source based skips there might be a case where we have
to run all tests. One option is to simply change a line in one of the
danger files but having something that can be set as title might be
easier for users.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2024-06-20 19:06:59 +02:00
parent d9183f0587
commit f134ab77bc
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
3 changed files with 13 additions and 1 deletions

View File

@ -640,11 +640,13 @@ local_integration_test_task: &local_integration_test_task
# Docs: ./contrib/cirrus/CIModes.md # Docs: ./contrib/cirrus/CIModes.md
only_if: *not_tag_branch_build_docs_machine only_if: *not_tag_branch_build_docs_machine
# skip when: - it is a PR (we never want to skip on nightly tests); and # skip when: - it is a PR (we never want to skip on nightly tests); and
# - CI:ALL title is not set; and
# - no danger files are changed; and # - no danger files are changed; and
# - when no int test code is changed; and # - when no int test code is changed; and
# - NOT (source code is changed AND NOT only test files) # - NOT (source code is changed AND NOT only test files)
skip: &skip_int_test >- skip: &skip_int_test >-
$CIRRUS_PR != '' && $CIRRUS_PR != '' &&
$CIRRUS_CHANGE_TITLE !=~ '.*CI:ALL.*' &&
!changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') &&
!changesInclude('test/e2e/**', 'test/utils/**') && !changesInclude('test/e2e/**', 'test/utils/**') &&
!(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) !(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
@ -743,10 +745,12 @@ podman_machine_task:
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*'
) || $CIRRUS_CRON == "main" ) || $CIRRUS_CRON == "main"
# skip when: - it is a PR (we never want to skip on nightly tests); and # skip when: - it is a PR (we never want to skip on nightly tests); and
# - CI:ALL title is not set; and
# - no danger files are changed; and # - no danger files are changed; and
# - no machine code files are changed # - no machine code files are changed
skip: &skip_machine_test >- skip: &skip_machine_test >-
$CIRRUS_PR != '' && $CIRRUS_PR != '' &&
$CIRRUS_CHANGE_TITLE !=~ '.*CI:ALL.*' &&
!changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') &&
!changesInclude('cmd/podman/machine/**', 'pkg/machine/**', '**/*machine*.go') !changesInclude('cmd/podman/machine/**', 'pkg/machine/**', '**/*machine*.go')
depends_on: *build depends_on: *build
@ -871,11 +875,13 @@ local_system_test_task: &local_system_test_task
$CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' && $CIRRUS_CHANGE_TITLE !=~ '.*CI:BUILD.*' &&
$CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*'
# skip when: - it is a PR (we never want to skip on nightly tests); and # skip when: - it is a PR (we never want to skip on nightly tests); and
# - CI:ALL title is not set; and
# - no danger files are changed; and # - no danger files are changed; and
# - no system test code is changed; and # - no system test code is changed; and
# - NOT (source code is changed AND not only test files) # - NOT (source code is changed AND not only test files)
skip: &skip_system_test >- skip: &skip_system_test >-
$CIRRUS_PR != '' && $CIRRUS_PR != '' &&
$CIRRUS_CHANGE_TITLE !=~ '.*CI:ALL.*' &&
!changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') &&
!changesInclude('test/system/**') && !changesInclude('test/system/**') &&
!(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) !(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))
@ -1001,10 +1007,12 @@ buildah_bud_test_task:
# Docs: ./contrib/cirrus/CIModes.md # Docs: ./contrib/cirrus/CIModes.md
only_if: *not_tag_magic only_if: *not_tag_magic
# skip when: - it is a PR (we never want to skip on nightly tests); and # skip when: - it is a PR (we never want to skip on nightly tests); and
# - CI:ALL title is not set; and
# - no danger files are changed; and # - no danger files are changed; and
# - no build source files are changed and no bud tests # - no build source files are changed and no bud tests
skip: >- skip: >-
$CIRRUS_PR != '' && $CIRRUS_PR != '' &&
$CIRRUS_CHANGE_TITLE !=~ '.*CI:ALL.*' &&
!changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') &&
!changesInclude('**/*build*.go', 'test/buildah-bud/**') !changesInclude('**/*build*.go', 'test/buildah-bud/**')
depends_on: *build depends_on: *build

View File

@ -126,6 +126,10 @@ is removed.
commit-change before Cirrus-CI will notice the draft-status update (i.e. commit-change before Cirrus-CI will notice the draft-status update (i.e.
pressing the re-run button **is not** good enough). pressing the re-run button **is not** good enough).
### Intended `[CI:ALL]` behavior:
Run even the tasks that are skipped based on changed sources conditions otherwise.
### Intended Branch tasks (and Cirrus-cron jobs): ### Intended Branch tasks (and Cirrus-cron jobs):
+ *build* + *build*
+ swagger + swagger

View File

@ -62,7 +62,7 @@ class TestDependsOn(TestCaseBase):
def test_skips(self): def test_skips(self):
"""2024-06 PR#23030: ugly but necessary duplication in skip conditions. Prevent typos or unwanted changes.""" """2024-06 PR#23030: ugly but necessary duplication in skip conditions. Prevent typos or unwanted changes."""
beginning = "$CIRRUS_PR != '' && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && " beginning = "$CIRRUS_PR != '' && $CIRRUS_CHANGE_TITLE !=~ '.*CI:ALL.*' && !changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') && "
real_source_changes = " && !(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))" real_source_changes = " && !(changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))"
for task_name in self.ALL_TASK_NAMES: for task_name in self.ALL_TASK_NAMES: