Skip to content

Commit

Permalink
chore: merge branch 'develop' into feat/proxy-component
Browse files Browse the repository at this point in the history
  • Loading branch information
hetangmodi-crest committed Jan 6, 2025
2 parents ad2c7c3 + f6cae67 commit 74940e2
Show file tree
Hide file tree
Showing 107 changed files with 701 additions and 287 deletions.
116 changes: 77 additions & 39 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -170,6 +171,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -353,6 +355,81 @@ jobs:
name: appinspect-api-html-report-${{ matrix.tags }}
path: AppInspect_response.html

init-build-run-appinspect-cli:
runs-on: ubuntu-22.04
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.7"
- uses: actions/download-artifact@v4
with:
name: UCC-UI-build
path: built-ui/
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- run: |
cp -R built-ui/. splunk_add_on_ucc_framework/package/appserver/static/js/
poetry install --only main
- run: |
poetry run ucc-gen init \
--addon-name "demo_addon_for_splunk" \
--addon-display-name "Demo Add-on for Splunk" \
--addon-input-name demo_input \
--add-license "Apache License 2.0" \
--include-author Splunk
- run: |
echo "# Binary File Declaration\n\nIgnoring lib/charset_normalizer/md.cpython-37m-x86_64-linux-gnu.so" > demo_addon_for_splunk/package/README.txt
- run: |
poetry run ucc-gen build --source demo_addon_for_splunk/package --ta-version 0.0.1
- run: |
mkdir packaged
poetry run ucc-gen package --path output/demo_addon_for_splunk -o packaged
- run: |
python3 -m pip install splunk-appinspect
- run: |
splunk-appinspect inspect packaged/demo_addon_for_splunk-0.0.1.tar.gz --mode test --included-tags cloud
build-test-addon-openapi-client:
name: build-test-addon-openapi-client Splunk ${{ matrix.splunk.version }}
runs-on: ubuntu-22.04
needs:
- meta
- build-test-addon
- build
- test-unit
- test-smoke
strategy:
matrix:
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/download-artifact@v4
with:
name: UCC-UI-build
path: built-ui/
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- run: |
cp -R built-ui/. splunk_add_on_ucc_framework/package/appserver/static/js/
poetry install --only main
- run: poetry run ucc-gen build --source tests/testdata/test_addons/package_global_config_everything/package -o out_${{ matrix.splunk.version }}
- run: |
cp out_${{ matrix.splunk.version }}/Splunk_TA_UCCExample/appserver/static/openapi.json ./oa_${{ matrix.splunk.version }}.json
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/oa_${{ matrix.splunk.version }}.json -g python -o /local/restapi_client_${{ matrix.splunk.version }}
- run: |
sudo chmod -R 777 ./restapi_client_${{ matrix.splunk.version }}
python3 -m pip install ./restapi_client_${{ matrix.splunk.version }}
- run: mv out_${{ matrix.splunk.version }} output
- run: |
./scripts/run_splunk.sh ${{ matrix.splunk.version }}
until curl -Lsk "https://localhost:8088/services/collector/health" &>/dev/null ; do echo -n "Waiting for HEC-" && sleep 5 ; done
timeout-minutes: 5
- run: python3 tests/testdata/expected_addons/expected_output_global_config_everything/client-test.py

all-checks:
if: ${{ !cancelled() }}
needs:
Expand Down Expand Up @@ -434,42 +511,3 @@ jobs:
run: |
poetry build
poetry publish -n -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_TOKEN }}
build-test-addon-openapi-client:
name: build-test-addon-openapi-client Splunk ${{ matrix.splunk.version }}
runs-on: ubuntu-22.04
needs:
- meta
- build-test-addon
- build
- test-unit
- test-smoke
strategy:
matrix:
splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/download-artifact@v4
with:
name: UCC-UI-build
path: built-ui/
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- run: |
cp -R built-ui/. splunk_add_on_ucc_framework/package/appserver/static/js/
poetry install --only main
- run: poetry run ucc-gen build --source tests/testdata/test_addons/package_global_config_everything/package -o out_${{ matrix.splunk.version }}
- run: |
cp out_${{ matrix.splunk.version }}/Splunk_TA_UCCExample/appserver/static/openapi.json ./oa_${{ matrix.splunk.version }}.json
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/oa_${{ matrix.splunk.version }}.json -g python -o /local/restapi_client_${{ matrix.splunk.version }}
- run: |
sudo chmod -R 777 ./restapi_client_${{ matrix.splunk.version }}
python3 -m pip install ./restapi_client_${{ matrix.splunk.version }}
- run: mv out_${{ matrix.splunk.version }} output
- run: |
./scripts/run_splunk.sh ${{ matrix.splunk.version }}
until curl -Lsk "https://localhost:8088/services/collector/health" &>/dev/null ; do echo -n "Waiting for HEC-" && sleep 5 ; done
timeout-minutes: 5
- run: python3 tests/testdata/expected_addons/expected_output_global_config_everything/client-test.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Splunk_TA_Dynatrace_ucc/*
demo_addon_for_splunk*/
addon_name/
init_addon_for_ucc_package/
demo_addon_for_splunk/

# UI build
# ignore everything except redirect_page.js
Expand Down
1 change: 1 addition & 0 deletions docs/inputs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ provided, a dropdown field will appear on the Inputs page. In contrast, a button
| [restHandlerModule](../advanced/custom_rest_handler.md) | string | It specify name of the REST handler script that implements the custom actions to be performed on CRUD operations for the given input. (Use with restHandlerClass) |
| [restHandlerClass](../advanced/custom_rest_handler.md) | string | It specify name of the class present in the restHandlerModule, which implements methods like handleCreate, handleEdit, handleList, handleDelete and is child class of splunktaucclib.rest_handler.admin_external.AdminExternalHandler. (Use with restHandlerModule) |
| hideForPlatform | string | Defines for which platform element should be hidden from UI perspective. Currently only two platforms are supported `cloud` or `enterprise`. |
| disableNewInput | boolean | Specifies whether a service's new input should be disabled on creation or not. If set to `True`, any new input created from the service will remain disabled until manually enabled by the user. Default: false |

### Usage

Expand Down
Loading

0 comments on commit 74940e2

Please sign in to comment.