Skip to content

Commit 5419232

Browse files
committed
Build modernization
1 parent 38de5e3 commit 5419232

File tree

3 files changed

+129
-27
lines changed

3 files changed

+129
-27
lines changed

.gitignore

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
1-
.gradle
2-
.idea
3-
build
4-
gradle
5-
out
6-
.vscode
1+
# Gradle
2+
.gradle/
3+
build/
4+
gradle-app.setting
5+
!gradle-wrapper.jar
6+
!gradle-wrapper.properties
7+
!gradle/wrapper/gradle-wrapper.jar
8+
!gradle/wrapper/gradle-wrapper.properties
9+
10+
# Java/JVM
11+
*.class
12+
*.jar
13+
*.war
14+
*.ear
15+
*.log
16+
hs_err_pid*
17+
replay_pid*
18+
19+
# IDE
20+
.idea/
21+
*.iml
22+
*.ipr
23+
*.iws
24+
.vscode/
25+
.settings/
26+
.project
27+
.classpath
28+
.metadata
29+
bin/
30+
out/
31+
32+
# OS
33+
.DS_Store
34+
.DS_Store?
35+
._*
36+
.Spotlight-V100
37+
.Trashes
38+
ehthumbs.db
39+
Thumbs.db
40+
41+
# Temporary files
42+
*.tmp
43+
*.temp
44+
*.swp
45+
*~
46+
47+
# Logs
48+
*.log
49+
50+
# Runtime
51+
*.pid

README.md

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,53 @@
22

33
This plugin captures Multiline Regex Key/Value data using a simple text format from a regular expression.
44

5+
## Requirements
6+
7+
- **Java**: 11 or later
8+
- **Gradle**: 8.x (included via Gradle Wrapper)
9+
- **Rundeck**: 5.16.0 or later
10+
- **Groovy**: 4.0.x (automatically managed by Gradle)
11+
512
## Build
613

14+
To build this plugin from source:
15+
16+
```bash
17+
# Clean and build the plugin
18+
./gradlew clean build
19+
20+
# The built JAR will be available in build/libs/
721
```
8-
gradle clean install
9-
```
22+
23+
### Development Requirements
24+
25+
For development, ensure you have:
26+
- JDK 11 or later installed
27+
- Git for version control
1028

1129
## Install
1230

31+
### From Release
32+
33+
1. Download the latest release JAR from the [releases page](../../releases)
34+
2. Copy the JAR to your Rundeck plugins directory:
35+
```bash
36+
cp multiline-regex-datacapture-filter-X.X.X.jar $RUNDECK_HOME/libext/
37+
```
38+
3. Restart Rundeck
39+
40+
### From Source
41+
42+
After building the plugin:
43+
44+
```bash
45+
# Copy the built JAR to Rundeck's plugin directory
46+
cp build/libs/multiline-regex-datacapture-filter-*.jar $RUNDECK_HOME/libext/
47+
48+
# Restart Rundeck to load the plugin
1349
```
14-
cp build/lib/multiline-regex-datacapture-filter-X.X.X.jar $RDECKBASE/libext
15-
```
50+
51+
**Note**: Replace `$RUNDECK_HOME` with your actual Rundeck installation directory (typically `/var/lib/rundeck` on Linux or the installation directory on other systems).
1652

1753
## How to use
1854

@@ -42,4 +78,29 @@ cp build/lib/multiline-regex-datacapture-filter-X.X.X.jar $RDECKBASE/libext
4278

4379
![Example3](examples/example3-result.png)
4480

81+
## Testing
82+
83+
Run the test suite:
84+
85+
```bash
86+
./gradlew test
87+
```
88+
89+
## Contributing
90+
91+
1. Fork the repository
92+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
93+
3. Make your changes
94+
4. Ensure tests pass (`./gradlew test`)
95+
5. Ensure the build works (`./gradlew build`)
96+
6. Commit your changes (`git commit -am 'Add amazing feature'`)
97+
7. Push to the branch (`git push origin feature/amazing-feature`)
98+
8. Open a Pull Request
99+
100+
## License
101+
102+
This project is licensed under the terms specified in the [LICENSE](LICENSE) file.
103+
104+
## Security
45105

106+
This project uses automated security scanning via Snyk to identify and address potential vulnerabilities in dependencies.

build.gradle

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
plugins {
22
id 'groovy'
33
id 'java'
4-
id 'pl.allegro.tech.build.axion-release' version '1.7.1'
4+
id 'pl.allegro.tech.build.axion-release' version '1.14.0'
55
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
66
}
77

88
group 'org.rundeck.plugins'
99

10+
java {
11+
toolchain {
12+
languageVersion = JavaLanguageVersion.of(11)
13+
}
14+
}
15+
1016
ext.publishName = "Multiline Regex Datacapture Filter ${project.version}"
1117
ext.publishDescription = project.description ?: 'Multiline Regex Datacapture Filter Plugin'
1218
ext.githubSlug = 'rundeck-plugins/multiline-regex-datacapture-filter-plugin'
1319
ext.developers = [
1420
[id: 'gschueler', name: 'Greg Schueler', email: '[email protected]']
1521
]
1622

17-
ext.rundeckVersion='5.14.0-rc1-20250722'
23+
ext.rundeckVersion='5.16.0-20251006'
1824
defaultTasks 'clean','build'
1925
ext.rundeckPluginVersion= '1.2'
2026
group 'org.rundeck.plugins'
@@ -24,15 +30,6 @@ scmVersion {
2430
tag {
2531
prefix = ''
2632
versionSeparator = ''
27-
def origDeserialize=deserialize
28-
//apend .0 to satisfy semver if the tag version is only X.Y
29-
deserialize = { config, position, tagName ->
30-
def orig = origDeserialize(config, position, tagName)
31-
if (orig.split('\\.').length < 3) {
32-
orig += ".0"
33-
}
34-
orig
35-
}
3633
}
3734
}
3835

@@ -55,19 +52,19 @@ configurations{
5552
//declare custom pluginLibs configuration to include only libs for this plugin
5653
pluginLibs
5754

58-
//declare compile to extend from pluginLibs so it inherits the dependencies
59-
compile{
55+
//declare implementation to extend from pluginLibs so it inherits the dependencies
56+
implementation{
6057
extendsFrom pluginLibs
6158
}
6259
}
6360

6461

6562
dependencies {
66-
implementation 'org.codehaus.groovy:groovy-all:2.3.11'
67-
testImplementation group: 'junit', name: 'junit', version: '4.12'
63+
implementation 'org.apache.groovy:groovy-all:4.0.21'
64+
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
6865

6966
implementation group: 'org.rundeck', name: 'rundeck-core', version: rundeckVersion
70-
testImplementation "org.spockframework:spock-core:0.7-groovy-2.0"
67+
testImplementation "org.spockframework:spock-core:2.3-groovy-4.0"
7168

7269
}
7370

@@ -88,7 +85,6 @@ jar {
8885
attributes 'Rundeck-Plugin-File-Version': version
8986
attributes 'Rundeck-Plugin-Version': rundeckPluginVersion, 'Rundeck-Plugin-Archive': 'true'
9087
attributes 'Rundeck-Plugin-Libs': "${libList}"
91-
attributes 'Main-Class': "io.github.valfadeev.rundeck.plugin.vault.VaultStoragePlugin"
9288
attributes 'Class-Path': "${libList} lib/rundeck-core-${rundeckVersion}.jar"
9389
}
9490
}

0 commit comments

Comments
 (0)