{{ report_containers[tag]["platform"] }} PASS
- {% else %} -{{ report_containers[tag]["platform"] }} FAIL
- {% endif %} -
- {% if report_status.lower() == "pass" %}
- {{ image }}
+
+
+
+
+ {% if report_status.lower() == "pass" %}
+ {{ image }}
+ {% else %}
+ {{ image }}:{{ tag }}
+ {% endif %}
+
+ Runtime: {{ report_containers[tag]["runtime"] }}
+
+
+ {{ report_containers[tag]["platform"] }}
+ {% if report_containers[tag]["test_success"] %}
+ PASS
{% else %}
- {{ image }}:{{ tag }}
+ FAIL
{% endif %}
-
- Runtime: {{ report_containers[tag]["runtime"] }}
- {% if screenshot %}
-
-
-
- {% else %}
-
- WEB_SCREENSHOT ENV Disabled
+
- {% endif %}
- Build Information
-
+
+
+ {% if screenshot %}
+
+
+
+ {% else %}
+
+
+ WEB_SCREENSHOT ENV Disabled
+
+ {% endif %}
+
+
+
{% for key, value in report_containers[tag]["build_info"].items() %}
-
- {{ key|capitalize }}: {{ value }}
+
+ {{ key }}
+ {{ value }}
{% endfor %}
-
- View Container Logs
-
-
- Expand
-
- {{ report_containers[tag]["logs"] }}
-
-
-
- View SBOM output
-
-
- Expand
-
- {{ report_containers[tag]["sysinfo"] }}
-
-
- {% if report_containers[tag]["browser_logs"] %}
-
- View Browser Console Logs
-
-
- Expand
-
- {{ report_containers[tag]["browser_logs"] }}
-
-
- {% endif %}
- {% if report_containers[tag]["has_warnings"]%}
-
- Warnings
- {% for warning in report_containers[tag]["warnings"] %}
- {% if report_containers[tag]["warnings"][warning] %}
-
- {{ report_containers[tag]["warnings"][warning] }}
+
+
+
+
+
+
+
+ Container Logs
- {% endif %}
- {% endfor %}
-
- {% endif %}
+
+
+
+ Open Full Log
+
+ {{ report_containers[tag]["logs"] }}
+
+
+
+
+
+
+
+ SBOM Output
+
+
+
+
+ Open Full SBOM
+
+ {{ report_containers[tag]["sysinfo"] }}
+
+
+
+
+ {% if report_containers[tag]["package_diff"] %}
+
+
+
+ Package Changes
+
+
+
+ {{ report_containers[tag]["package_diff"] }}
+
+
+ {% endif %}
+
+
+ {% if report_containers[tag]["browser_logs"] %}
+
+
+
+ Browser Console Logs
+
+
+
+
+ {{ report_containers[tag]["browser_logs"] }}
+
+
+ {% endif %}
+
+
+ {% if report_containers[tag]["has_warnings"] %}
+
+
+
+ Warnings Detected
+
+
+
+ {% for warning in report_containers[tag]["warnings"] %}
+ {% if report_containers[tag]["warnings"][warning] %}
+
+ {{ report_containers[tag]["warnings"][warning] }}
+
+ {% endif %}
+ {% endfor %}
+
+
+ {% endif %}
+
+
+
+
-
+
Test
Result
Message
@@ -656,46 +822,63 @@
{% for test in report_containers[tag]["test_results"] %}
- {{ test }}
+ {{ test }}
+
{% if report_containers[tag]["test_results"][test]['status'] == 'PASS' %}
- {{ report_containers[tag]["test_results"][test]['status'] }}
+ {{ report_containers[tag]["test_results"][test]['status'] }}
{% else %}
- {{ report_containers[tag]["test_results"][test]['status'] }}
+ {{ report_containers[tag]["test_results"][test]['status'] }}
{% endif %}
- {{ report_containers[tag]["test_results"][test]["message"] }}
- {{ report_containers[tag]["test_results"][test]["runtime"] }}
+
+ {{ report_containers[tag]["test_results"][test]["message"] }}
+ {{ report_containers[tag]["test_results"][test]["runtime"] }}
{% endfor %}
+
{% endfor %}
+
+
-
- View Python Logs
-
+
+
-
diff --git a/readme-vars.yml b/readme-vars.yml
index 01bead7..839ea0e 100644
--- a/readme-vars.yml
+++ b/readme-vars.yml
@@ -82,6 +82,9 @@ full_custom_readme: |
| `WEB_AUTH` | Credentials for basic auth, format `user:password`. Leave empty for none. | `""` |
| `WEB_SCREENSHOT_DELAY` | Seconds to wait after the page loads before taking the screenshot. | `20` |
+ ### Generating a package diff
+
+ In development mode you can build an actual comparison image by tagging it as `testimage:latest`. This will simulate the pacakge difference diff by dumping the SBOM of your test image and comparing it to the last release of the repo.
## Advanced Usage (CI Environment)
diff --git a/requirements.txt b/requirements.txt
index 4764ccd..82c4981 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,3 +6,4 @@ jinja2==3.1.2
requests==2.28.2
pyvirtualdisplay==3.0
ansi2html==1.8.0
+pillow==12.1.1
diff --git a/tests/test_ci.py b/tests/test_ci.py
index 98dba30..69a2ec0 100644
--- a/tests/test_ci.py
+++ b/tests/test_ci.py
@@ -150,7 +150,7 @@ def test_watch_container_logs(ci: CI, mock_container: Mock):
def test_take_screenshot(ci:CI,mock_container: Mock):
screenshot: bool = ci.take_screenshot(mock_container, ci.tags[0])
if screenshot:
- assert os.path.isfile(os.path.join(ci.outdir, f"{ci.tags[0]}.png")) is True
+ assert os.path.isfile(os.path.join(ci.outdir, f"{ci.tags[0]}.jpg")) is True
assert ci.tag_report_tests[ci.tags[0]]["test"][CITests.CAPTURE_SCREENSHOT.value]["status"] == CITestResult.PASS.value
else:
assert ci.tag_report_tests[ci.tags[0]]["test"][CITests.CAPTURE_SCREENSHOT.value]["status"] == CITestResult.FAIL.value
+ {% if report_status.lower() == "pass" %} + {{ image }} + {% else %} + {{ image }}:{{ tag }} + {% endif %} +
+
-
- {% else %}
-
+
+ {% else %}
+ Expand
-{{ report_containers[tag]["logs"] }}
- Expand
-{{ report_containers[tag]["sysinfo"] }}
- Expand
-{{ report_containers[tag]["browser_logs"] }}
- Warnings
- {% for warning in report_containers[tag]["warnings"] %} - {% if report_containers[tag]["warnings"][warning] %} - {{ report_containers[tag]["warnings"][warning] }}
+
+
+
+ Container Logs
- {% endif %}
- {% endfor %}
-
{{ report_containers[tag]["logs"] }}
+
+
+ SBOM Output
+
+
+ {{ report_containers[tag]["sysinfo"] }}
+
+
+ Package Changes
+
+
+ {{ report_containers[tag]["package_diff"] }}
+
+
+ Browser Console Logs
+
+
+ {{ report_containers[tag]["browser_logs"] }}
+
+
+ Warnings Detected
+
+
+ {{ report_containers[tag]["warnings"][warning] }}
+| Test | Result | Message | @@ -656,46 +822,63 @@||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ test }} | +{{ test }} | + {% if report_containers[tag]["test_results"][test]['status'] == 'PASS' %} -{{ report_containers[tag]["test_results"][test]['status'] }} | +{{ report_containers[tag]["test_results"][test]['status'] }} | {% else %} -{{ report_containers[tag]["test_results"][test]['status'] }} | +{{ report_containers[tag]["test_results"][test]['status'] }} | {% endif %} -{{ report_containers[tag]["test_results"][test]["message"] }} | -{{ report_containers[tag]["test_results"][test]["runtime"] }} | + +{{ report_containers[tag]["test_results"][test]["message"] }} | +{{ report_containers[tag]["test_results"][test]["runtime"] }} |