-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ROCKS-1330/vul-scan-notification
- Loading branch information
Showing
24 changed files
with
455 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,4 +104,3 @@ jobs: | |
do | ||
MM_CHANNEL_ID="${channel}" ./src/notifications/send_to_mattermost.sh | ||
done | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
description: 'Cache key (to fetch image trigger from cache)' | ||
required: false | ||
type: string | ||
external_ref_id: #(1) | ||
external_ref_id: # (1) | ||
description: 'Optional ID for unique run detection' | ||
required: false | ||
type: string | ||
|
@@ -34,7 +34,7 @@ jobs: | |
outputs: | ||
oci-image-name: ${{ steps.get-image-name.outputs.img-name }} | ||
steps: | ||
- name: ${{ inputs.external_ref_id }} #(2) | ||
- name: ${{ inputs.external_ref_id }} # (2) | ||
run: echo 'Started by ${{ inputs.external_ref_id }}' >> "$GITHUB_STEP_SUMMARY" | ||
|
||
- uses: actions/checkout@v4 | ||
|
@@ -174,8 +174,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ matrix.canonical-tag }} | ||
fetch-depth: 0 | ||
ref: ${{ matrix.canonical-tag }} | ||
|
||
- uses: dev-drprasad/[email protected] | ||
# We force delete an existing tag because otherwise we won't get | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from pathlib import Path | ||
|
||
DATA_DIR = Path(__file__).parent / "data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<testsuites> | ||
<testsuite name="pytest" errors="0" failures="1" skipped="0" tests="6" time="0.127" timestamp="2024-08-13T11:57:19.793644+00:00" hostname="fv-az1756-954"> | ||
<testcase classname="oci-factory.src.build-rock.configure.test.test_generate_matrix" name="test_get_target_archs" time="0.001" /> | ||
<testcase classname="oci-factory.src.build-rock.configure.test.test_generate_matrix" name="test_configure_matrices" time="0.000" /> | ||
<testcase classname="oci-factory.src.build-rock.configure.test.test_generate_matrix" name="test_configure_matrices_fallback_exception" time="0.000" /> | ||
<testcase classname="oci-factory.src.build-rock.configure.test.test_generate_matrix" name="test_configure_matrices_lpci_fallback" time="0.000" /> | ||
<testcase classname="oci-factory.src.build-rock.configure.test.test_generate_matrix" name="test_set_build_config_outputs" time="0.001" /> | ||
<testcase classname="oci-factory.src.docs.test.test_generate_oci_doc_yaml" name="test_example_failure" time="0.001"> | ||
<failure message="AssertionError: This is to exemplify the output of a failed unit test assert False">def test_example_failure(): | ||
> assert False, "This is to exemplify the output of a failed unit test" | ||
E AssertionError: This is to exemplify the output of a failed unit test | ||
E assert False | ||
oci-factory/src/docs/test/test_generate_oci_doc_yaml.py:8: AssertionError | ||
</failure> | ||
</testcase> | ||
</testsuite> | ||
</testsuites> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest==8.3.2 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import pytest | ||
from io import StringIO | ||
|
||
|
||
@pytest.fixture | ||
def str_buff(): | ||
"""String IO fixture for simulating a file object""" | ||
with StringIO() as buffer: | ||
yield buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
import xml.etree.ElementTree as ET | ||
from .. import DATA_DIR | ||
|
||
|
||
@pytest.fixture | ||
def junit_with_failure(): | ||
"""Load ET of junit xml report with failure""" | ||
sample = DATA_DIR / "junit_xml_failure.xml" | ||
|
||
tree = ET.parse(sample) | ||
root = tree.getroot() | ||
return root |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from ..fixtures.buffers import str_buff | ||
from ..fixtures.junit_et import junit_with_failure | ||
import tools.junit_to_markdown.convert as report | ||
|
||
|
||
def test_print_redirection(junit_with_failure, str_buff, capsys): | ||
"""Ensure that the report is entirely redirected when needed""" | ||
|
||
report.print_junit_report(junit_with_failure, str_buff) | ||
report.print_junit_report(junit_with_failure, None) # print report to stdout | ||
|
||
str_buff.seek(0) | ||
str_buff_content = str_buff.read() | ||
|
||
captured = capsys.readouterr() | ||
stdout_content = captured.out | ||
|
||
assert stdout_content == str_buff_content, "Printing to multiple locations." |
Empty file.
Oops, something went wrong.