Skip to content

Commit 027014a

Browse files
fix(ci): appinspect-api app_path must be dir, not file (Phase 1.5 hotfix)
Phase 1.5's first run (ID 25998624960, 2026-05-17) failed with: NotADirectoryError: [Errno 20] Not a directory: 'dist/wl_manager-1.0.0-rc1.spl/dist/wl_manager-1.0.0-rc1.spl' Root cause is in splunk/appinspect-api-action@v3.0.5 entrypoint.sh: ADDON_NAME=$(ls $INPUT_APP_PATH) ADDON_FULL_PATH="$INPUT_APP_PATH/$ADDON_NAME" The action treats app_path as a DIRECTORY and joins the ls output back onto it. We were passing the .spl file directly, which made ls echo the path back and produce the doubled path above. Passing 'dist/' would also fail because the dir contains three siblings (.spl + .spl.sha256 + .spl.cdx.json), making `ls` emit multiple newline-separated names and confusing the join. Fix: stage the .spl into a clean single-file dir (dist/appinspect/) in the Locate step and point both action invocations at that dir via a new appinspect_dir output. spl_file output kept for any future consumer (e.g. uploading the .spl as a workflow artifact).
1 parent ee0d449 commit 027014a

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/appinspect-api.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,18 @@ jobs:
7575
# The .spl filename is derived from default/app.conf:[launcher] version
7676
# by scripts/package.sh. Glob it so this workflow survives RC bumps
7777
# (e.g. 1.0.0-rc1 → 1.0.0-rc2) without an edit.
78-
- name: Locate .spl
78+
#
79+
# The splunk/appinspect-api-action v3.0.5 entrypoint runs
80+
# `ls $INPUT_APP_PATH` and joins the result back onto $INPUT_APP_PATH,
81+
# so app_path must be a DIRECTORY containing exactly one file
82+
# (the .spl). dist/ also holds the .spl.sha256 and the .spl.cdx.json
83+
# SBOM siblings, so we stage the .spl into a dedicated single-file
84+
# dir to avoid the entrypoint's `ls` glob emitting multiple lines.
85+
# See action source v3.0.5 entrypoint.sh — the first run (ID
86+
# 25998624960, 2026-05-17) failed with NotADirectoryError on
87+
# 'dist/wl_manager-1.0.0-rc1.spl/dist/wl_manager-1.0.0-rc1.spl'
88+
# because we passed the file path directly.
89+
- name: Locate .spl + stage for AppInspect
7990
id: spl
8091
run: |
8192
set -euo pipefail
@@ -84,15 +95,21 @@ jobs:
8495
echo "ERROR: no .spl produced under dist/"
8596
exit 1
8697
fi
98+
APPINSPECT_DIR="dist/appinspect"
99+
rm -rf "$APPINSPECT_DIR"
100+
mkdir -p "$APPINSPECT_DIR"
101+
cp "$SPL_FILE" "$APPINSPECT_DIR/"
87102
echo "spl_file=$SPL_FILE" >> "$GITHUB_OUTPUT"
103+
echo "appinspect_dir=$APPINSPECT_DIR" >> "$GITHUB_OUTPUT"
88104
echo "Built: $SPL_FILE ($(du -h "$SPL_FILE" | cut -f1))"
105+
echo "Staged for AppInspect: $APPINSPECT_DIR/$(basename "$SPL_FILE")"
89106
90107
- name: AppInspect API — Cloud Vetting profile (cloud tag)
91108
uses: splunk/appinspect-api-action@v3.0.5
92109
with:
93110
username: ${{ secrets.SPLUNK_DEV_USERNAME }}
94111
password: ${{ secrets.SPLUNK_DEV_PASSWORD }}
95-
app_path: ${{ steps.spl.outputs.spl_file }}
112+
app_path: ${{ steps.spl.outputs.appinspect_dir }}
96113
included_tags: cloud
97114
log_level: INFO
98115

@@ -102,6 +119,6 @@ jobs:
102119
with:
103120
username: ${{ secrets.SPLUNK_DEV_USERNAME }}
104121
password: ${{ secrets.SPLUNK_DEV_PASSWORD }}
105-
app_path: ${{ steps.spl.outputs.spl_file }}
122+
app_path: ${{ steps.spl.outputs.appinspect_dir }}
106123
included_tags: private_app
107124
log_level: INFO

0 commit comments

Comments
 (0)