mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
intentional fail and catch
This commit is contained in:
@@ -14,7 +14,6 @@ jobs:
|
||||
repository: 'splunk/security_content' #this should be the TARGET repo of the PR. we hardcode it for now
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11' #Available versions here - https://github.com/actions/python-versions/releases easy to change/make a matrix/use pypy
|
||||
@@ -36,8 +35,8 @@ jobs:
|
||||
# Instructions for pulling a PR were taken from:
|
||||
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
|
||||
- name: Run ContentCTL test for changes against target branch
|
||||
id: contentctl_test
|
||||
run: |
|
||||
|
||||
echo "Current Branch (Head Ref): ${{ github.head_ref }}"
|
||||
echo "Target Branch (Base Ref): ${{ github.base_ref }}"
|
||||
git pull > /dev/null 2>&1
|
||||
@@ -47,6 +46,7 @@ jobs:
|
||||
git switch new_branch_for_testing
|
||||
contentctl test --verbose --disable-tqdm --no-enable-integration-testing --container-settings.num-containers 2 --post-test-behavior never_pause mode:changes --mode.target-branch ${{ github.base_ref }}
|
||||
echo "contentctl test - COMPLETED"
|
||||
echo "exit_code=$?" >> $GITHUB_OUTPUT
|
||||
|
||||
# Store test_results/summary.yml and dist/DA-ESS-ContentUpdate-latest.tar.gz to job artifact-test_summary_results.zip
|
||||
- name: store_artifacts
|
||||
@@ -69,3 +69,10 @@ jobs:
|
||||
echo "This job will fail if there are failures in unit-testing"
|
||||
python .github/workflows/format_test_results.py >> $GITHUB_STEP_SUMMARY
|
||||
echo "The Unit testing is completed. See details in the unit-testing job summary UI "
|
||||
|
||||
# Fail the job if contentctl test failed
|
||||
- name: Check contentctl test results
|
||||
if: steps.contentctl_test.outputs.exit_code != '0'
|
||||
run: |
|
||||
echo "::error::contentctl test failed with exit code ${{ steps.contentctl_test.outputs.exit_code }}"
|
||||
exit 1
|
||||
+2
-2
@@ -30,11 +30,11 @@ splunk_api_username: null
|
||||
post_test_behavior: pause_on_failure
|
||||
apps:
|
||||
- uid: 1621
|
||||
title: Splunk_SA_CIM
|
||||
title: Splunk Common Information Model (CIM)
|
||||
appid: Splunk_SA_CIM
|
||||
version: 6.0.3
|
||||
description: description of app
|
||||
hardcoded_path: https://attack-range-appbinaries.s3.us-west-2.amazonaws.com/splunk-common-information-model-cim_603.tgz
|
||||
hardcoded_path: https://attack-range-appbinaries.s3.us-west-2.amazonaws.com/splunk-common-information-model-(cim)_603.tgz
|
||||
- uid: 6553
|
||||
title: Splunk Add-on for Okta Identity Cloud
|
||||
appid: Splunk_TA_okta_identity_cloud
|
||||
|
||||
Reference in New Issue
Block a user