Skip to content

Commit 5025821

Browse files
authored
Merge develop changes to release (2.1.0) branch (#65)
* Added support for Docker logging tags within Splunk source and source… (#56) * Updated license to include licensing for templates.go * Updates for sending telemetry (#58) * Moved tests to CircleCI (#60) * update release tags
1 parent 43ef368 commit 5025821

29 files changed

+463
-439
lines changed
File renamed without changes.

.circleci/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
jobs:
3+
build:
4+
resource_class: large
5+
machine:
6+
image: ubuntu-1604:201903-01
7+
working_directory: ~/.go_workspace/src/repo
8+
steps:
9+
- checkout
10+
- run:
11+
name: Builder
12+
command: |
13+
bash .circleci/compile.sh
14+
15+
- run:
16+
name: Run unit tests
17+
command: |
18+
bash .circleci/unit_tests.sh
19+
20+
- run:
21+
name: Run functional tests
22+
command: |
23+
bash .circleci/functional_tests.sh

.circleci/functional_tests.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env bash
2+
export SHELL=/bin/bash
3+
4+
set -e
5+
6+
echo "Running functional tests..."
7+
8+
#sudo su
9+
10+
# Start the plugin
11+
sudo /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin &
12+
rm -rf /opt/circleci/.pyenv
13+
echo "Creating virtual env to run functional tests..."
14+
cd test
15+
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
16+
sudo apt-get update
17+
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev git
18+
export PATH="~/.pyenv/bin:$PATH"
19+
pyenv install 3.7.0
20+
pyenv global 3.7.0
21+
22+
23+
sudo pip install --upgrade pip
24+
pip install virtualenv
25+
virtualenv --python=python3.5 venv
26+
source venv/bin/activate
27+
pip install -r requirements.txt
28+
deactivate
29+
30+
#Run functional tests from within virtualenv
31+
sudo venv/bin/python -m pytest --cache-clear \
32+
--splunkd-url https://$SPLUNK_HEC_HOST:8089 \
33+
--splunk-user admin \
34+
--splunk-password notchangeme \
35+
--splunk-hec-url https://$SPLUNK_HEC_HOST:8088 \
36+
--splunk-hec-token $SPLUNK_HEC_TOKEN \
37+
--docker-plugin-path /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin \
38+
--fifo-path /home/circleci/.go_workspace/src/repo/pipe \
39+
-p no:warnings partial_log/test_partial_log.py::test_partial_log
40+
41+
sudo venv/bin/python -m pytest --cache-clear \
42+
--splunkd-url https://$SPLUNK_HEC_HOST:8089 \
43+
--splunk-user admin \
44+
--splunk-password notchangeme \
45+
--splunk-hec-url https://$SPLUNK_HEC_HOST:8088 \
46+
--splunk-hec-token $SPLUNK_HEC_TOKEN \
47+
--docker-plugin-path /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin \
48+
--fifo-path /home/circleci/.go_workspace/src/repo/pipe \
49+
-p no:warnings partial_log/test_partial_log.py::test_partial_log_flush_timeout
50+
51+
sudo venv/bin/python -m pytest --cache-clear \
52+
--splunkd-url https://$SPLUNK_HEC_HOST:8089 \
53+
--splunk-user admin \
54+
--splunk-password notchangeme \
55+
--splunk-hec-url https://$SPLUNK_HEC_HOST:8088 \
56+
--splunk-hec-token $SPLUNK_HEC_TOKEN \
57+
--docker-plugin-path /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin \
58+
--fifo-path /home/circleci/.go_workspace/src/repo/pipe \
59+
-p no:warnings partial_log/test_partial_log.py::test_partial_log_flush_size_limit
60+
61+
sudo venv/bin/python -m pytest --cache-clear \
62+
--splunkd-url https://$SPLUNK_HEC_HOST:8089 \
63+
--splunk-user admin \
64+
--splunk-password notchangeme \
65+
--splunk-hec-url https://$SPLUNK_HEC_HOST:8088 \
66+
--splunk-hec-token $SPLUNK_HEC_TOKEN \
67+
--docker-plugin-path /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin \
68+
--fifo-path /home/circleci/.go_workspace/src/repo/pipe \
69+
-p no:warnings malformed_data
70+
71+
sudo venv/bin/python -m pytest --cache-clear --verbose \
72+
--splunkd-url https://$SPLUNK_HEC_HOST:8089 \
73+
--splunk-user admin \
74+
--splunk-password notchangeme \
75+
--splunk-hec-url https://$SPLUNK_HEC_HOST:8088 \
76+
--splunk-hec-token $SPLUNK_HEC_TOKEN \
77+
--docker-plugin-path /home/circleci/.go_workspace/src/repo/splunk-logging-plugin/rootfs/bin/splunk-logging-plugin \
78+
--fifo-path /home/circleci/.go_workspace/src/repo/pipe \
79+
-p no:warnings config_params

.circleci/unit_tests.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
export SHELL=/bin/bash
3+
4+
set -e
5+
6+
mkdir /home/circleci/.go_workspace/bin
7+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
8+
dep ensure
9+
10+
echo "Running Golang unit tests..."
11+
12+
go test
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Report a bug encountered while operating Splunk Connect for Docker
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
11+
12+
Please do not report security vulnerabilities with public GitHub issue reports. Please report security issues here: https://www.splunk.com/goto/report_vulnerabilities_prodsec
13+
-->
14+
15+
16+
**What happened**:
17+
18+
**What you expected to happen**:
19+
20+
**How to reproduce it (as minimally and precisely as possible)**:
21+
22+
**Anything else we need to know?**:
23+
24+
**Environment**:
25+
- Docker version (use `docker version`):
26+
- OS (e.g: `cat /etc/os-release`):
27+
- Splunk version:
28+
- Others:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Enhancement Request
3+
about: Suggest an enhancement to the Splunk Connect for Docker project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<<!-- Please only use this template for submitting enhancement requests -->
11+
12+
**What would you like to be added**:
13+
14+
**Why is this needed**:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Proposed changes
2+
3+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
4+
5+
## Types of changes
6+
7+
What types of changes does your code introduce?
8+
_Put an `x` in the boxes that apply_
9+
10+
- [ ] Bugfix (non-breaking change which fixes an issue)
11+
- [ ] New feature (non-breaking change which adds functionality)
12+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13+
14+
## Checklist
15+
16+
_Put an `x` in the boxes that apply._
17+
18+
- [ ] I have read the [CONTRIBUTING](https://github.com/splunk/docker-logging-plugin/blob/develop/CONTRIBUTING.md) doc
19+
- [ ] I have read the [CLA](https://github.com/splunk/docker-logging-plugin/blob/develop/CLA.md)
20+
- [ ] I have added tests that prove my fix is effective or that my feature works
21+
- [ ] I have added necessary documentation (if appropriate)
22+
- [ ] Any dependent changes have been merged and published in downstream modules
23+

CLA.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
By submitting a Contribution to this Work, You agree that Your Contribution is made subject to the primary LICENSE
2+
file applicable to this Work. In addition, You represent that: (i) You are the copyright owner of the Contribution
3+
or (ii) You have the requisite rights to make the Contribution.
4+
5+
Definitions:
6+
7+
“You” shall mean: (i) yourself if you are making a Contribution on your own behalf; or (ii) your company,
8+
if you are making a Contribution on behalf of your company. If you are making a Contribution on behalf of your
9+
company, you represent that you have the requisite authority to do so.
10+
11+
"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing
12+
work, that is intentionally submitted by You for inclusion in, or documentation of, this project/repository. For the
13+
purposes of this definition, "submitted" means any form of electronic, verbal, or written communication submitted for
14+
inclusion in this project/repository, including but not limited to communication on electronic mailing lists, source
15+
code control systems, and issue tracking systems that are managed by, or on behalf of, the maintainers of
16+
the project/repository.
17+
18+
“Work” shall mean the collective software, content, and documentation in this project/repository.

LICENSE

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-
202+
203203
=======================================================================
204204
Splunk Connect for Docker Subcomponents:
205205

@@ -232,3 +232,11 @@ The following components are provided under a BSD-style license. See project lin
232232

233233
(BSD 2-Clause "Simplified" License) errors (https://github.com/pkg/errors/blob/master/LICENSE)
234234
(BSD 3-Clause) protobuf/io (https://github.com/gogo/protobuf/blob/master/LICENSE)
235+
236+
========================================================================
237+
Mozilla Public License 2.0
238+
========================================================================
239+
240+
The following components are provided under a Mozilla public license. See project link for details.
241+
242+
(Mozilla Public License 2.0) templates.go from Keel (https://github.com/keel-hq/keel/blob/master/LICENSE)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PLUGIN_NAME=splunk/docker-logging-plugin
2-
PLUGIN_TAG=2.0.1
2+
PLUGIN_TAG=2.1.0
33
PLUGIN_DIR=./splunk-logging-plugin
44

55
all: clean docker rootfs create

0 commit comments

Comments
 (0)