Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[flake8]
; E203 and E231 are enforced by black. E713 and E272 are ignored for
; compatibility with the existing codebase.
extend-ignore = E203,E231,E713,E272
per-file-ignores =
; imported but unused
tests/functional/demo_addon_for_splunk/package/bin/demo_addon_for_splunk_rh_endpoint.py: F401,
Expand All @@ -12,6 +15,7 @@ per-file-ignores =
splunk_add_on_ucc_modinput_test/functional/entities/test.py: E501,
splunk_add_on_ucc_modinput_test/functional/entities/task.py: E501,
splunk_add_on_ucc_modinput_test/functional/pytest_plugin/utils.py: E501,
splunk_add_on_ucc_modinput_test/functional/pytest_plugin/options.py: E501,
splunk_add_on_ucc_modinput_test/functional/manager.py: E501,
splunk_add_on_ucc_modinput_test/functional/entities/forge.py: E501,
; undefined name 'configuration'
Expand Down
46 changes: 19 additions & 27 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
- uses: actions/checkout@v4
- run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
fossa analyze --debug
fossa analyze --branch "$FOSSA_BRANCH" --debug
fossa report attribution --format text > /tmp/THIRDPARTY
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
FOSSA_BRANCH: ${{ github.head_ref || github.ref_name }}
- uses: actions/upload-artifact@v4
with:
name: THIRDPARTY
Expand All @@ -51,9 +52,7 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
# - "3.13" # there are issues to fix for this version
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -78,15 +77,13 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
# - "3.9"
# - "3.13"
- "3.13"
# use version currently used in CI/CD pipelines
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.13"
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- run: poetry install
- name: Build UCC test
Expand All @@ -102,8 +99,6 @@ jobs:
strategy:
matrix:
python-version:
# - "3.7"
- "3.9"
- "3.13"
steps:
- uses: actions/checkout@v4
Expand All @@ -122,8 +117,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
steps:
- uses: actions/checkout@v4
Expand All @@ -141,8 +134,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
steps:
- uses: actions/checkout@v4
Expand All @@ -160,8 +151,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
steps:
- uses: actions/checkout@v4
Expand All @@ -179,8 +168,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
needs:
- build
Expand All @@ -195,7 +182,7 @@ jobs:
path: dist/
- name: Clone Example TA
run: |
cd tests/functional/
cd "$RUNNER_TEMP"
git clone https://github.com/splunk/splunk-example-ta.git
cd splunk-example-ta
./scripts/run_locally.sh
Expand All @@ -204,13 +191,13 @@ jobs:
cd splunk-example-ta-test
python -m venv .test
source .test/bin/activate
pip install ../../../dist/*.whl
pip install "$GITHUB_WORKSPACE"/dist/*.whl
export MODINPUT_TEST_SPLUNK_HOST=localhost
export MODINPUT_TEST_SPLUNK_PORT=8089
export MODINPUT_TEST_SPLUNK_USERNAME=admin
export MODINPUT_TEST_SPLUNK_PASSWORD_BASE64=$(ucc-test-modinput base64encode -s 'Chang3d!')
export MODINPUT_TEST_EXAMPLE_API_KEY_BASE64=$(ucc-test-modinput base64encode -s 'super-secret-api-token')
ucc-test-modinput init -o ../splunk-example-ta/output/Splunk_TA_Example/appserver/static/openapi.json
ucc-test-modinput init -o "$RUNNER_TEMP"/splunk-example-ta/output/Splunk_TA_Example/appserver/static/openapi.json
pytest tests/ucc_modinput_functional

test-cli-gen:
Expand All @@ -219,8 +206,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
needs:
- build
Expand All @@ -235,13 +220,13 @@ jobs:
path: dist/
- name: Clone Example TA
run: |
cd tests/functional/
cd "$RUNNER_TEMP"
git clone https://github.com/splunk/splunk-example-ta.git
cd splunk-example-ta
./scripts/run_locally.sh
python -m venv .test
source .test/bin/activate
pip install --force-reinstall ../../../dist/*.whl
pip install --force-reinstall "$GITHUB_WORKSPACE"/dist/*.whl
export MODINPUT_TEST_SPLUNK_HOST=localhost
export MODINPUT_TEST_SPLUNK_PORT=8089
export MODINPUT_TEST_SPLUNK_USERNAME=admin
Expand Down Expand Up @@ -271,9 +256,16 @@ jobs:
# Very important: semantic-release won't trigger a tagged
# build if this is not set false
persist-credentials: false
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.13"
- run: curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
- uses: actions/download-artifact@v4
with:
Expand All @@ -290,7 +282,7 @@ jobs:
extra_plugins: |
semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- if: ${{ steps.semantic.outputs.new_release_published == 'true' }}
run: |
poetry build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: "3.13"
- run: |
pip install mkdocs mkdocs-material mkdocstrings-python mkdocs-print-site-plugin
- name: Deploy to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
exclude: (^docs/|^splunk_add_on_ucc_framework/commands/imports.py)
additional_dependencies: ['types-PyYAML']
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.4
hooks:
- id: flake8
exclude: (^splunk_add_on_ucc_framework/commands/init_template/|^splunk_add_on_ucc_framework/commands/imports.py)
Loading
Loading