@@ -122,6 +122,7 @@ jobs:
122122 runs-on : ubuntu-latest
123123 outputs :
124124 execute-knowledge-labeled : ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}
125+ execute-escu-labeled : ${{ steps.configure-tests-on-labels.outputs.execute_escu_labeled }}
125126 execute-ui-labeled : ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}
126127 execute-modinput-labeled : ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}
127128 execute-ucc-modinput-labeled : ${{ steps.configure-tests-on-labels.outputs.execute_ucc_modinput_functional_labeled }}
@@ -156,7 +157,7 @@ jobs:
156157 run : |
157158 set +e
158159 declare -A EXECUTE_LABELED
159- TESTSET=("execute_knowledge" "execute_ui" "execute_modinput_functional" "execute_ucc_modinput_functional" "execute_scripted_inputs" "execute_requirement_test" "execute_upgrade")
160+ TESTSET=("execute_knowledge" "execute_escu" " execute_ui" "execute_modinput_functional" "execute_ucc_modinput_functional" "execute_scripted_inputs" "execute_requirement_test" "execute_upgrade")
160161 for test_type in "${TESTSET[@]}"; do
161162 EXECUTE_LABELED["$test_type"]="false"
162163 done
@@ -373,6 +374,59 @@ jobs:
373374 run : |
374375 find tests -type d -maxdepth 1 -mindepth 1 | sed 's|^tests/||g' | while read -r TESTSET; do echo "$TESTSET=true" >> "$GITHUB_OUTPUT"; echo "$TESTSET::true"; done
375376
377+ run-escu-tests :
378+ if : ${{ !cancelled() && needs.setup-workflow.outputs.execute-escu-labeled == 'true' }}
379+ needs :
380+ - build
381+ - setup-workflow
382+ - setup
383+
384+ runs-on : ubuntu-latest
385+ strategy :
386+ fail-fast : false
387+ matrix :
388+ python-version :
389+ - " 3.11"
390+ permissions :
391+ actions : read
392+ deployments : read
393+ contents : read
394+ packages : read
395+ statuses : read
396+ checks : write
397+ steps :
398+ - uses : actions/checkout@v4
399+ - uses : actions/setup-python@v5
400+ with :
401+ python-version : ${{ matrix.python-version }}
402+ - name : Install Python Dependencies and ContentCTL
403+ run : |
404+ python -m pip install --upgrade pip
405+ pip install contentctl==5.0.0
406+
407+ - name : Download TA Build Artifact
408+ uses : actions/download-artifact@v4
409+ with :
410+ name : package-splunkbase # Match the name used in the "build" stage
411+ path : ta_build
412+
413+ - name : Run ESCU Tests
414+ run : |
415+ echo "running escu tests"
416+ # git clone https://github.com/splunk/security_content.git
417+
418+ TA_BUILD=$(ls ta_build/*)
419+ echo $TA_BUILD
420+ python3 yaml_parser.py ${{ needs.setup.outputs.addon-name }} ${{ needs.setup.outputs.labels }} ${{ github.workspace }}/ta_build/$TA_BUILD > test.txt
421+
422+ TEST_FILES=$(cat test.txt)
423+ echo $TEST_FILES
424+ cd security_content
425+ cat contentctl.yml
426+ pwd
427+ echo "contentctl test --verbose --container-settings.no-leave-running mode:selected --mode files $TEST_FILES"
428+ contentctl test --verbose --container-settings.no-leave-running mode:selected --mode.files $TEST_FILES
429+
376430 run-unit-tests :
377431 name : test-unit-python3-${{ matrix.python-version }}
378432 if : ${{ needs.test-inventory.outputs.unit == 'true' }}
0 commit comments