Skip to content

Commit 7cafff4

Browse files
committed
Merged in latest code from upstream
2 parents 20a86da + 307f729 commit 7cafff4

File tree

160 files changed

+3651
-3231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+3651
-3231
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
omit =
3+
.tox/*
4+
tests/*
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Logs or Screenshots**
24+
If applicable, add logs or screenshots to help explain your problem.
25+
26+
**Splunk (please complete the following information):**
27+
- Version: [e.g. 8.0.5]
28+
- OS: [e.g. Ubuntu 20.04.1]
29+
- Deployment: [e.g. single-instance]
30+
31+
**SDK (please complete the following information):**
32+
- Version: [e.g. 1.6.14]
33+
- Language Runtime Version: [e.g. Python 3.7]
34+
- OS: [e.g. MacOS 10.15.7]
35+
36+
**Additional context**
37+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch: {}
7+
8+
jobs:
9+
find_version:
10+
name: Find Version
11+
runs-on: ubuntu-latest
12+
outputs:
13+
version: ${{ steps.get-version.outputs.version }}
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v2.3.2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.7
21+
- name: Get version
22+
id: get-version
23+
run: python -c 'import splunklib; print("::set-output name=version::%s" % splunklib.__version__)'
24+
tag_version:
25+
needs: find_version
26+
name: Tag Version
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Create tag
30+
uses: tvdias/github-tagger@v0.0.2
31+
with:
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
tag: ${{ needs.find_version.outputs.version }}
34+
release:
35+
needs: [find_version, tag_version]
36+
name: Create Release
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v2.3.2
41+
- name: Create Release
42+
id: create_release
43+
uses: actions/create-release@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ needs.find_version.outputs.version }}
48+
release_name: Release/${{ needs.find_version.outputs.version }}
49+
body: |
50+
## Version ${{ needs.find_version.outputs.version }}
51+
52+
**TODO: Insert CHANGELOG.md contents here.**
53+
draft: false
54+
prerelease: false
55+
publish:
56+
needs: release
57+
name: Deploy Release to PyPI
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout source
61+
uses: actions/checkout@v2.3.2
62+
- name: Set up Python
63+
uses: actions/setup-python@v2
64+
with:
65+
python-version: 3.7
66+
- name: Install dependencies
67+
run: pip install twine
68+
- name: Build package
69+
run: python setup.py sdist
70+
- name: Publish package to PyPI
71+
uses: pypa/gh-action-pypi-publish@v1.3.1
72+
with:
73+
user: __token__
74+
password: ${{ secrets.pypi_password }}
75+
# Test upload
76+
# - name: Publish package to TestPyPI
77+
# uses: pypa/gh-action-pypi-publish@master
78+
# with:
79+
# user: __token__
80+
# password: ${{ secrets.test_pypi_password }}
81+
# repository_url: https://test.pypi.org/legacy/

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Python CI
2+
3+
on:
4+
[push, pull_request]
5+
6+
jobs:
7+
build:
8+
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os:
13+
- ubuntu-latest
14+
python: [2.7, 3.7]
15+
splunk-version:
16+
- "8.0"
17+
- "latest"
18+
fail-fast: false
19+
20+
services:
21+
splunk:
22+
image: splunk/splunk:${{matrix.splunk-version}}
23+
env:
24+
SPLUNK_START_ARGS: --accept-license
25+
SPLUNK_HEC_TOKEN: 11111111-1111-1111-1111-1111111111113
26+
SPLUNK_PASSWORD: changed!
27+
SPLUNK_APPS_URL: https://github.com/splunk/sdk-app-collection/releases/download/v1.1.0/sdkappcollection.tgz
28+
ports:
29+
- 8000:8000
30+
- 8088:8088
31+
- 8089:8089
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Setup Python
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: ${{ matrix.python }}
39+
- name: Create .splunkrc file
40+
run: |
41+
cd ~
42+
echo host=localhost > .splunkrc
43+
echo port=8089 >> .splunkrc
44+
echo username=admin >> .splunkrc
45+
echo password=changed! >> .splunkrc
46+
echo scheme=https >> .splunkrc
47+
echo version=${{ matrix.splunk }} >> .splunkrc
48+
- name: Install tox
49+
run: pip install tox
50+
- name: Test Execution
51+
run: tox -e py

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
.coverage
77
.coverage.*
88
.python-version
9+
.vscode
910
__stdout__
1011
docs/_build
1112
build/
@@ -15,16 +16,18 @@ MANIFEST
1516
coverage_report
1617
test.log
1718
examples/*/local
18-
examples/*/metadata/local.meta
19+
examples/**/local.meta
20+
examples/**/*.log
1921
tests/searchcommands_data/log/
2022
tests/searchcommands_data/output/
2123
examples/searchcommands_app/searchcommand_app.log
2224
Test Results*.html
2325
tests/searchcommands/data/app/app.log
2426
splunk_sdk.egg-info/
2527
dist/
26-
examples/searchcommands_app/package/default/commands.conf
27-
examples/searchcommands_app/package/bin/packages
28+
examples/searchcommands_app/package/lib/splunklib
2829
tests/searchcommands/apps/app_with_logging_configuration/*.log
2930
*.observed
30-
venv/
31+
venv/
32+
.tox
33+
test-reports/

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)