Skip to content

Commit

Permalink
Fixed Gradle build and added Snyk badge
Browse files Browse the repository at this point in the history
Signed-off-by: Decker, Stefan <Stefan.Decker@gdata.de>
  • Loading branch information
StefanHufschmidt committed Feb 7, 2019
1 parent 4637389 commit 2f05fa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Graylog AlertManager Notification Plugin [![Build Status](https://travis-ci.org/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback.svg?branch=master)](https://travis-ci.org/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback)
# Graylog AlertManager Notification Plugin [![Build Status](https://travis-ci.org/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback.svg?branch=master)](https://travis-ci.org/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback) [![Known Vulnerabilities](https://snyk.io/test/github/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback/badge.svg)](https://snyk.io/test/github/GDATASoftwareAG/Graylog-Plugin-AlertManager-Callback)
This plugin can be used for connecting [Graylog](https://www.graylog.org/) alerts to the [Prometheus](https://prometheus.io/) [AlertManager](https://prometheus.io/docs/alerting/alertmanager/).

The plugin development is based on [Graylog2/graylog-plugin-sample](https://github.com/Graylog2/graylog-plugin-sample) which is mentioned in the [Graylog plugin documentation](http://docs.graylog.org/en/2.4/pages/plugins.html).
Expand Down
19 changes: 5 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ buildscript {
}


def title = "mOPS_Graylog_AlertManagerNotificationPlugin"

def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--long'
standardOutput = stdout
}
return stdout.toString().trim()
}
def title = "Graylog-Plugin-AlertManager-Callback"

apply plugin: "com.github.harbby.gradle.serviceloader"
apply plugin: 'java'
Expand All @@ -35,7 +26,7 @@ serviceLoader {
}

group = 'de.gdata.mobilelab'
version = getVersionName()
version = 0.1

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down Expand Up @@ -79,14 +70,14 @@ dependencies {
}

jar {
archiveName = "graylog-plugin-alertmanagercallback-" + getVersionName() + ".jar"
archiveName = "graylog-plugin-alertmanagercallback-" + version + ".jar"
baseName = title
version = getVersionName()
version = 0.1
group = "de.gdata.mobilelab.alertmanagercallback"
manifest {
attributes(
'Implementation-Title': title,
'Implementation-Version': getVersionName(),
'Implementation-Version': version,
'Build-Time': new Date().format("yyy-MM-dd HH:mm:ss"),
'Graylog-Plugin-Properties-Path': 'de.gdata.mobilelab.alertmanagercallback.graylog-plugin-alertmanagercallback'
)
Expand Down

0 comments on commit 2f05fa7

Please sign in to comment.