Commit 9e9450f
authored
CodeQl: Support repos with no packages. (#525)
The codeql workflow will attempting to locate Packages by finding
folders ending with pkg and then attempting to find a .dsc located
within that folder.
For repos without any valid pkgs, the codeql workflow will generate an
empty matrix. Adding a package_count variable to differentiate this
scenario and gate creating and empty matrix.
Most repos list the codeql Analyze task as a required check. With an
empty matrix, this would fail. Skipping the Analyze task would result in
a pending check that will never execute.
Modify the codeql to create an empty sarif file when the package_count
is zero and upload this. This will allow the Analyze step to run and
pass CI when a repo contains no valid packages that can have results
uploaded.
This is being handled in this manor to allow the same CI checks to exist
for repos which still contain a valid release/202502 branch, and a
release/202511 branch which deprecates the repo.1 parent 57fca6d commit 9e9450f
1 file changed
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
502 | 505 | | |
503 | 506 | | |
504 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
505 | 553 | | |
0 commit comments