CI: On vX.Y-rhel branches, ensure that some downstream Jira issue is linked

In the RHEL specific branches we want to ensure that all MRs link to
at least one downstream Jira ticket. To do this we add a new test in
validate-source similar to the existing pr-should-include-tests. This
test only runs on actual pull requests.

The syntax for linking to a Jira is "Fixes " or "Fixes: ", followed by
one jira links, like so:

```
Fixes https://issues.redhat.com/browse/RHEL-50506
Fixes: https://issues.redhat.com/browse/RHEL-50506
```

Note: This is the same syntax as for a regular github issue reference.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This commit is contained in:
Alexander Larsson
2024-08-14 15:54:06 +02:00
parent 43fe3ebaf3
commit 17193af962
5 changed files with 235 additions and 0 deletions

View File

@ -745,6 +745,10 @@ test-binaries: test/checkseccomp/checkseccomp test/goecho/goecho install.cataton
tests-included:
contrib/cirrus/pr-should-include-tests
.PHONY: test-jira-links-included
test-jira-links-included:
contrib/cirrus/pr-should-link-jira
.PHONY: tests-expect-exit
tests-expect-exit:
@if grep -E --line-number 'Expect.*ExitCode' test/e2e/*.go | grep -E -v ', ".*"\)'; then \