Skip to content

Commit 92b45aa

Browse files
authored
Make AppInspect actually fail on error (#782)
1 parent 6ecd6a1 commit 92b45aa

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎.github/actions/run-appinspect/action.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,15 @@ runs:
1919
tar -czf mock_app.tgz --exclude="__pycache__" bin default metadata
2020
- name: Validate the mock app with AppInspect
2121
shell: bash
22-
run: uvx splunk-appinspect inspect ./tests/system/test_apps/generating_app/mock_app.tgz --included-tags cloud
22+
run: |
23+
# AppInspect doesn't follow UNIX conventions, gotta handle their exit codes explicitly
24+
# https://dev.splunk.com/enterprise/reference/appinspect/appinspectcliref#inspect
25+
uvx splunk-appinspect inspect \
26+
./tests/system/test_apps/generating_app/mock_app.tgz \
27+
--included-tags cloud --ci || exit_code=$?
28+
case "${exit_code:-0}" in
29+
0) ;; # all checks passed
30+
103) ;; # warnings (--ci)
31+
104) ;; # future-tag warnings (--ci)
32+
*) exit "${exit_code}" ;; # 101=failures, 1=packaging, 2=exception, 3=error, etc.
33+
esac

0 commit comments

Comments
 (0)