Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hidapple committed Mar 25, 2019
0 parents commit 121709b
Show file tree
Hide file tree
Showing 16 changed files with 611 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.idea/
*.iml
*.ipr
*.iws
.classpath
.project
.settings/
target/
dependency-reduced-pom.xml
node_modules
node
build
build.config.js.sample

27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
addons:
apt:
packages:
- rpm
before_deploy:
- mvn jdeb:jdeb && export RELEASE_DEB_FILE=$(ls target/*.deb)
- mvn rpm:rpm && export RELEASE_RPM_FILE=$(find target/ -name '*.rpm' | tail -1)
- rm -f target/original-*.jar
- export RELEASE_PKG_FILE=$(ls target/*.jar)
- echo "Deploying release to GitHub releases"
deploy:
provider: releases
api_key:
secure: <enter your encrypted GitHub access token>
file:
- "${RELEASE_PKG_FILE}"
- "${RELEASE_DEB_FILE}"
- "${RELEASE_RPM_FILE}"
skip_cleanup: true
on:
tags: true
jdk: oraclejdk8
26 changes: 26 additions & 0 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Getting started with your new Graylog plugin
============================================

Welcome to your new Graylog plugin!

Please refer to http://docs.graylog.org/en/latest/pages/plugins.html for documentation on how to write
plugins for Graylog.

Travis CI
---------

There is a `.travis.yml` template in this project which is prepared to automatically
deploy the plugin artifacts (JAR, DEB, RPM) to GitHub releases.

You just have to add your encrypted GitHub access token to the `.travis.yml`.
The token can be generated in your [GitHub personal access token settings](https://github.com/settings/tokens).

Before Travis CI works, you have to enable it. Install the Travis CI command line
application and execute `travis enable`.

To encrypt your GitHub access token you can use `travis encrypt`.

Alternatively you can use `travis setup -f releases` to automatically create a GitHub
access token and add it to the `.travis.yml` file. **Attention:** doing this
will replace some parts of the `.travis.yml` file and you have to restore previous
settings.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Teams Plugin for Graylog

[![Build Status](https://travis-ci.org/https://github.com/hidapple/graylog-plugin-teams.git.svg?branch=master)](https://travis-ci.org/https://github.com/hidapple/graylog-plugin-teams.git)

__Use this paragraph to enter a description of your plugin.__

**Required Graylog version:** 2.0 and later

Installation
------------

[Download the plugin](https://github.com/https://github.com/hidapple/graylog-plugin-teams.git/releases)
and place the `.jar` file in your Graylog plugin directory. The plugin directory
is the `plugins/` folder relative from your `graylog-server` directory by default
and can be configured in your `graylog.conf` file.

Restart `graylog-server` and you are done.

Development
-----------

You can improve your development experience for the web interface part of your plugin
dramatically by making use of hot reloading. To do this, do the following:

* `git clone https://github.com/Graylog2/graylog2-server.git`
* `cd graylog2-server/graylog2-web-interface`
* `ln -s $YOURPLUGIN plugin/`
* `npm install && npm start`

Usage
-----

__Use this paragraph to document the usage of your plugin__


Getting started
---------------

This project is using Maven 3 and requires Java 8 or higher.

* Clone this repository.
* Run `mvn package` to build a JAR file.
* Optional: Run `mvn jdeb:jdeb` and `mvn rpm:rpm` to create a DEB and RPM package respectively.
* Copy generated JAR file in target directory to your Graylog plugin directory.
* Restart the Graylog.

Plugin Release
--------------

We are using the maven release plugin:

```
$ mvn release:prepare
[...]
$ mvn release:perform
```

This sets the version numbers, creates a tag and pushes to GitHub. Travis CI will build the release artifacts and upload to GitHub automatically.
6 changes: 6 additions & 0 deletions build.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const path = require('path');

module.exports = {
// Make sure that this is the correct path to the web interface part of the Graylog server repository.
web_src_path: path.resolve(__dirname, '../graylog2-server', 'graylog2-web-interface'),
};
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Teams",
"version": "1.0.0-SNAPSHOT",
"description": "",
"repository": {
"type": "git",
"url": "https://github.com/hidapple/graylog-plugin-teams.git"
},
"scripts": {
"build": "webpack",
"lint": "eslint -c .eslintrc src/**/*",
"test": "jest"
},
"keywords": [
"graylog"
],
"author": "Shohei Hida",
"license": "MIT",
"dependencies": {
},
"devDependencies": {
"graylog-web-plugin": "file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin"
}
}
Loading

0 comments on commit 121709b

Please sign in to comment.