Skip to content

Commit 9b8fb85

Browse files
feat: Add Appinspect API action (#168)
* ci: always upload artifact * ci: add secrets * ci: rename appinspect stage * docs: update readme * ci: appinpsect api now runs only on push and PR to main
1 parent 605e847 commit 9b8fb85

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ on:
4545
SA_GPG_PASSPHRASE:
4646
description: GPG signature passphrase
4747
required: true
48+
SPL_COM_USER:
49+
description: username to splunk.com
50+
required: true
51+
SPL_COM_PASSWORD:
52+
description: password to splunk.com
53+
required: true
4854
permissions:
4955
contents: read
5056
packages: read
@@ -793,6 +799,40 @@ jobs:
793799
path: |
794800
*_markdown.txt
795801
802+
appinspect-api:
803+
name: appinspect api ${{ matrix.tags }}
804+
needs: build
805+
if: |
806+
!cancelled() &&
807+
needs.build.result == 'success' &&
808+
( github.base_ref == 'main' || github.ref_name == 'main' )
809+
runs-on: ubuntu-latest
810+
strategy:
811+
fail-fast: false
812+
matrix:
813+
tags:
814+
- "cloud"
815+
- "self-service"
816+
- ""
817+
steps:
818+
- uses: actions/checkout@v3
819+
- uses: actions/download-artifact@v3
820+
with:
821+
name: package-splunkbase
822+
path: build/package
823+
- name: AppInspect API
824+
uses: splunk/[email protected]
825+
with:
826+
username: ${{ secrets.SPL_COM_USER }}
827+
password: ${{ secrets.SPL_COM_PASSWORD }}
828+
app_path: build/package/
829+
included_tags: ${{ matrix.tags }}
830+
- uses: actions/upload-artifact@v3
831+
if: always()
832+
with:
833+
name: appinspect-api-html-report-${{ matrix.tags }}
834+
path: AppInspect_response.html
835+
796836
artifact-registry:
797837
runs-on: ubuntu-latest
798838
needs:

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
SA_GH_USER_EMAIL: ${{ secrets.SA_GH_USER_EMAIL }}
4242
SA_GPG_PRIVATE_KEY: ${{ secrets.SA_GPG_PRIVATE_KEY }}
4343
SA_GPG_PASSPHRASE: ${{ secrets.SA_GPG_PASSPHRASE }}
44+
SPL_COM_USER: ${{ secrets.SPL_COM_USER }}
45+
SPL_COM_PASSWORD: ${{ secrets.SPL_COM_PASSWORD }}
4446
```
4547
4648
***
@@ -403,6 +405,53 @@ appinspect_self-service_checks.json
403405
appinspect_splunk_appinspect_checks.json
404406
```
405407
408+
409+
AppInspect API
410+
=======================
411+
412+
**Description**
413+
414+
- Splunk AppInspect performs validation checks on your Splunk app package against a set of standardized criteria to evaluate the app structure, features, security, and adherence to Splunk Cloud Platform requirements. Unlike previous job that uses AppInspect CLI, this one uses AppInspect API
415+
416+
- [https://dev.splunk.com/enterprise/docs/developapps/testvalidate/appinspect/](https://dev.splunk.com/enterprise/docs/developapps/testvalidate/appinspect/useappinspectapi/)
417+
418+
- Respective Appinspect tags used in stage:
419+
420+
- https://dev.splunk.com/enterprise/docs/developapps/testvalidate/appinspect/#Validate-an-app-using-tags
421+
422+
```
423+
"cloud"
424+
"self-service"
425+
"" (no tags)
426+
```
427+
**Action used:** https://github.com/splunk/appinspect-api-action
428+
429+
**Pass/fail behaviour:**
430+
431+
- Splunk AppInspect API generates HTML report that details the successes, warnings, and failures flagged by the checks.
432+
433+
- By using the results of the report, user can fix any issues in your app before you submit it for cloud vetting or for publication to Splunkbase.
434+
435+
**Exception file:**
436+
437+
- `.appinspect_api.expect.yaml` We can use this file to add false positives with appropriate comments.
438+
439+
- ref: https://github.com/splunk/splunk-add-on-for-cisco-meraki/blob/main/.app-vetting.yaml - Connect to preview
440+
441+
**Troubleshooting steps for failures if any:**
442+
443+
- User can refer to this for failures https://dev.splunk.com/enterprise/docs/developapps/testvalidate/appinspect/#Common-issues-reported-by-Splunk-AppInspect
444+
445+
446+
**Artifacts:**
447+
448+
```
449+
appinspect-api-html-report
450+
appinspect-api-html-report-cloud
451+
appinspect-api-html-report-self-service
452+
```
453+
454+
406455
# setup
407456
408457
**Description:**

0 commit comments

Comments
 (0)