Skip to content

Commit d544d32

Browse files
authored
Merge pull request #1 from miguelantonio/master
Implementation of HTTP notification Plugin
2 parents 6df979b + e0c6efc commit d544d32

File tree

11 files changed

+1064
-1
lines changed

11 files changed

+1064
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
out
3+
.gradle
4+
/.idea

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
# http-notification
1+
# Http Notification Plugin
2+
23
A notification plugin that makes HTTP requests
4+
5+
## Build
6+
Run `gradle build` to build the jar file
7+
8+
## Install
9+
10+
Copy the file http-notification-plugin-X.Y.X.jar file to the `$RDECK_BASE\libext` folder

build.gradle

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
maven { url "https://oss.sonatype.org/content/groups/public"}
5+
}
6+
}
7+
8+
plugins {
9+
id 'pl.allegro.tech.build.axion-release' version '1.5.0'
10+
}
11+
12+
group 'com.rundeck.plugin'
13+
14+
apply plugin: 'pl.allegro.tech.build.axion-release'
15+
apply plugin: 'groovy'
16+
apply plugin: 'java'
17+
18+
sourceCompatibility = 1.8
19+
ext.rundeckPluginVersion = '1.2'
20+
ext.pluginClassNames='com.rundeck.plugin.HttpNotificationPlugin'
21+
ext.pluginName = 'Git Resource Model'
22+
ext.pluginDescription = 'Writable Git Resource Model'
23+
24+
25+
scmVersion {
26+
ignoreUncommittedChanges = false
27+
tag {
28+
prefix = 'v'
29+
versionSeparator = ''
30+
def origDeserialize=deserialize
31+
//apend .0 to satisfy semver if the tag version is only X.Y
32+
deserialize = { config, position, tagName ->
33+
def orig = origDeserialize(config, position, tagName)
34+
if (orig.split('\\.').length < 3) {
35+
orig += ".0"
36+
}
37+
orig
38+
}
39+
}
40+
}
41+
project.version = scmVersion.version
42+
43+
configurations{
44+
//declare custom pluginLibs configuration to include only libs for this plugin
45+
pluginLibs
46+
47+
//declare compile to extend from pluginLibs so it inherits the dependencies
48+
compile{
49+
extendsFrom pluginLibs
50+
}
51+
}
52+
53+
repositories {
54+
mavenCentral()
55+
}
56+
57+
dependencies {
58+
compile group: 'org.rundeck', name: 'rundeck-core', version: '2.10.1'
59+
pluginLibs group: 'org.codehaus.groovy.modules.http-builder', name: 'http-builder', version: '0.7.1'
60+
pluginLibs group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
61+
pluginLibs group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version: '1.13'
62+
63+
compile 'org.codehaus.groovy:groovy-all:2.3.11'
64+
testCompile group: 'junit', name: 'junit', version: '4.12'
65+
66+
67+
testCompile "org.codehaus.groovy:groovy-all:2.3.7"
68+
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
69+
testCompile "cglib:cglib-nodep:2.2.2"
70+
testCompile 'org.objenesis:objenesis:1.4'
71+
72+
}
73+
74+
75+
// task to copy plugin libs to output/lib dir
76+
task copyToLib(type: Copy) {
77+
into "$buildDir/output/lib"
78+
from configurations.pluginLibs
79+
}
80+
81+
82+
83+
jar {
84+
from "$buildDir/output"
85+
manifest {
86+
def libList = configurations.pluginLibs.collect{'lib/' + it.name}.join(' ')
87+
attributes 'Rundeck-Plugin-Classnames': pluginClassNames
88+
attributes 'Rundeck-Plugin-File-Version': project.version
89+
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion
90+
attributes 'Rundeck-Plugin-Archive': 'true'
91+
attributes 'Rundeck-Plugin-Libs': "${libList}"
92+
}
93+
dependsOn(copyToLib)
94+
}
95+
96+
97+
//set jar task to depend on copyToLib
98+
jar.dependsOn(copyToLib)
99+
100+
task wrapper(type: Wrapper) {
101+
gradleVersion = '3.3'
102+
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
103+
}

gradle/wrapper/gradle-wrapper.jar

52.9 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Dec 27 09:45:56 CLST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = 'http-notification-plugin'
2+

0 commit comments

Comments
 (0)