Skip to content

Commit 2fdbff6

Browse files
committed
Initial commit.
0 parents  commit 2fdbff6

36 files changed

+2936
-0
lines changed

Diff for: .dependabot/config.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 1
2+
3+
update_configs:
4+
- package_manager: "java:maven"
5+
directory: "/"
6+
update_schedule: "daily"

Diff for: .gitattributes

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.java text
7+
*.xml text
8+
*.md text
9+
*.txt text
10+
11+
# Denote all files that are truly binary and should not be modified.
12+
*.gif binary
13+
*.png binary
14+
*.jpg binary

Diff for: .github/release-drafter.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
tag-template: forensics-api-$NEXT_PATCH_VERSION
2+
name-template: Forensics API $NEXT_PATCH_VERSION 🎁
3+
4+
template: |
5+
$CHANGES
6+
7+
categories:
8+
- title: 🚨 Removed
9+
label: removed
10+
- title: ⚠️ Deprecated
11+
label: deprecated
12+
- title: 🚀 New features and improvements
13+
labels:
14+
- enhancement
15+
- feature
16+
- title: 🐛 Bug Fixes
17+
labels:
18+
- bug
19+
- fix
20+
- bugfix
21+
- regression
22+
- title: 📖 Documentation updates
23+
label: documentation
24+
- title: 📦 Dependency updates
25+
label: dependencies
26+
- title: 🔧 Internal changes
27+
label: internal
28+
- title: 🚦 Tests
29+
labels:
30+
- test
31+
- tests
32+
33+
replacers:
34+
- search: '/\[*JENKINS-(\d+)\]*\s*-*\s*/g'
35+
replace: '[JENKINS-$1](https://issues.jenkins-ci.org/browse/JENKINS-$1) - '

Diff for: .github/workflows/maven.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: GitHub Actions
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
12+
strategy:
13+
matrix:
14+
platform: [ubuntu-latest, macos-latest, windows-latest]
15+
16+
runs-on: ${{ matrix.platform }}
17+
name: on ${{ matrix.platform }}
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Set up JDK 8
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 1.8
25+
- name: Build with Maven
26+
run: mvn -V clean verify --file pom.xml '-Djenkins.test.timeout=5000'

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
target
3+
*.iml
4+
.classpath
5+
pom.xml.versionsBackup
6+
.DS_Store

Diff for: .mvn/extensions.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
2+
<extension>
3+
<groupId>io.jenkins.tools.incrementals</groupId>
4+
<artifactId>git-changelist-maven-extension</artifactId>
5+
<version>1.1</version>
6+
</extension>
7+
</extensions>

Diff for: .mvn/maven.config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-Pconsume-incrementals
2+
-Pmight-produce-incrementals

Diff for: .remarkrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [
3+
"remark-preset-lint-recommended",
4+
["remark-lint-list-item-indent", false]
5+
]
6+
}

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All notable changes of this project will be automatically logged by release drafter in
4+
[GitHub releases](https://github.com/jenkinsci/forensics-api-plugin/releases).
5+
6+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Diff for: Jenkinsfile

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
node ('maven') {
2+
timeout(200) {
3+
stage ('Linux Checkout') {
4+
checkout scm
5+
}
6+
7+
stage ('Linux Build') {
8+
String jdk = '8'
9+
String jdkTool = "jdk${jdk}"
10+
List<String> env = [
11+
"JAVA_HOME=${tool jdkTool}",
12+
'PATH+JAVA=${JAVA_HOME}/bin',
13+
]
14+
String command
15+
List<String> mavenOptions = [
16+
'--batch-mode',
17+
'--errors',
18+
'--update-snapshots',
19+
'-Dmaven.test.failure.ignore',
20+
]
21+
if (jdk.toInteger() > 7 && infra.isRunningOnJenkinsInfra()) {
22+
/* Azure mirror only works for sufficiently new versions of the JDK due to Letsencrypt cert */
23+
def settingsXml = "${pwd tmp: true}/settings-azure.xml"
24+
writeFile file: settingsXml, text: libraryResource('settings-azure.xml')
25+
mavenOptions += "-s $settingsXml"
26+
}
27+
mavenOptions += "clean verify jacoco:prepare-agent test jacoco:report"
28+
command = "mvn ${mavenOptions.join(' ')}"
29+
env << "PATH+MAVEN=${tool 'mvn'}/bin"
30+
31+
withEnv(env) {
32+
sh command
33+
}
34+
35+
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
36+
37+
junit testResults: '**/target/*-reports/TEST-*.xml'
38+
39+
recordIssues enabledForFailure: true, tool: mavenConsole(), referenceJobName: 'Plugins/forensics-api/master'
40+
recordIssues enabledForFailure: true, tools: [java(), javaDoc()], sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
41+
recordIssues enabledForFailure: true, tool: checkStyle(pattern: 'target/checkstyle-result.xml'), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
42+
recordIssues enabledForFailure: true, tool: errorProne(), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
43+
recordIssues enabledForFailure: true, tool: cpd(pattern: 'target/cpd.xml'), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
44+
recordIssues enabledForFailure: true, tool: pmdParser(pattern: 'target/pmd.xml'), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
45+
recordIssues enabledForFailure: true, tool: spotBugs(pattern: 'target/spotbugsXml.xml'), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
46+
recordIssues enabledForFailure: true, tool: taskScanner(includePattern:'**/*.java', excludePattern:'target/**/*', highTags:'FIXME', normalTags:'TODO'), sourceCodeEncoding: 'UTF-8', referenceJobName: 'Plugins/forensics-api/master'
47+
jacoco()
48+
}
49+
}
50+
}
51+
52+
node ('windows') {
53+
timeout(200) {
54+
stage ('Windows Checkout') {
55+
checkout scm
56+
}
57+
58+
stage ('Windows Build') {
59+
String jdk = '8'
60+
String jdkTool = "jdk${jdk}"
61+
List<String> env = [
62+
"JAVA_HOME=${tool jdkTool}",
63+
'PATH+JAVA=${JAVA_HOME}/bin',
64+
]
65+
String command
66+
List<String> mavenOptions = [
67+
'--batch-mode',
68+
'--errors',
69+
'--update-snapshots',
70+
'-Dmaven.test.failure.ignore',
71+
]
72+
if (jdk.toInteger() > 7 && infra.isRunningOnJenkinsInfra()) {
73+
/* Azure mirror only works for sufficiently new versions of the JDK due to Letsencrypt cert */
74+
def settingsXml = "${pwd tmp: true}/settings-azure.xml"
75+
writeFile file: settingsXml, text: libraryResource('settings-azure.xml')
76+
mavenOptions += "-s $settingsXml"
77+
}
78+
mavenOptions += "clean verify"
79+
command = "mvn ${mavenOptions.join(' ')}"
80+
env << "PATH+MAVEN=${tool 'mvn'}/bin"
81+
82+
withEnv(env) {
83+
bat command
84+
}
85+
86+
junit testResults: '**/target/*-reports/TEST-*.xml'
87+
}
88+
}
89+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Dr. Ullrich Hafner
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Forensics API Jenkins Plugin
2+
3+
[![Jenkins Version](https://img.shields.io/badge/Jenkins-2.138.4-green.svg?label=min.%20Jenkins)](https://jenkins.io/download/)
4+
![JDK8](https://img.shields.io/badge/jdk-8-yellow.svg?label=min.%20JDK)
5+
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
7+
This Jenkins plug-in provides utility classes that can be used to accelerate plugin development.
8+

Diff for: codacy/checkstyle.xml

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Checkstyle-Configuration: Ullrich Hafner
4+
Description: Ullrich Hafner's Checkstyle Rules.
5+
-->
6+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
7+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
8+
<module name="Checker">
9+
<property name="severity" value="warning"/>
10+
<module name="TreeWalker">
11+
<module name="SuppressWarningsHolder" />
12+
13+
<module name="OneStatementPerLine"/>
14+
<module name="OuterTypeFilename"/>
15+
<module name="NestedForDepth">
16+
<property name="max" value="2"/>
17+
</module>
18+
<module name="InnerTypeLast"/>
19+
20+
<module name="AnnotationUseStyle"/>
21+
<module name="Indentation">
22+
<property name="arrayInitIndent" value="8"/>
23+
<property name="lineWrappingIndentation" value="8"/>
24+
</module>
25+
<module name="MissingDeprecated"/>
26+
<module name="PackageAnnotation"/>
27+
<module name="EqualsAvoidNull"/>
28+
<module name="GenericWhitespace"/>
29+
<module name="JavadocType"/>
30+
<module name="JavadocMethod">
31+
<property name="scope" value="protected"/>
32+
<property name="allowUndeclaredRTE" value="true"/>
33+
<property name="suppressLoadErrors" value="true"/>
34+
</module>
35+
<module name="MissingJavadocMethodCheck">
36+
<property name="allowMissingPropertyJavadoc" value="true"/>
37+
</module>
38+
<module name="JavadocVariable">
39+
<property name="scope" value="protected"/>
40+
<property name="tokens" value="VARIABLE_DEF"/>
41+
</module>
42+
<module name="JavadocStyle">
43+
<property name="severity" value="warning"/>
44+
</module>
45+
<module name="JavadocStyle">
46+
<property name="checkEmptyJavadoc" value="true"/>
47+
</module>
48+
<module name="ConstantName"/>
49+
<module name="LocalFinalVariableName"/>
50+
<module name="LocalVariableName"/>
51+
<module name="MemberName"/>
52+
<module name="MethodName"/>
53+
<module name="PackageName"/>
54+
<module name="ParameterName"/>
55+
<module name="StaticVariableName"/>
56+
<module name="TypeName"/>
57+
<module name="ClassTypeParameterName"/>
58+
<module name="MethodTypeParameterName"/>
59+
<module name="AnonInnerLength">
60+
<property name="max" value="10"/>
61+
</module>
62+
<module name="MethodLength"/>
63+
<module name="ParameterNumber"/>
64+
<module name="EmptyForIteratorPad"/>
65+
<module name="NoWhitespaceAfter">
66+
<property name="tokens" value="ARRAY_INIT,BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
67+
</module>
68+
<module name="NoWhitespaceBefore"/>
69+
<module name="OperatorWrap"/>
70+
<module name="TypecastParenPad">
71+
<property name="tokens" value="RPAREN,TYPECAST"/>
72+
</module>
73+
<module name="WhitespaceAfter">
74+
<property name="tokens" value="COMMA,SEMI"/>
75+
</module>
76+
<module name="WhitespaceAround">
77+
<property name="tokens"
78+
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
79+
</module>
80+
<module name="ParenPad"/>
81+
<module name="MethodParamPad"/>
82+
<module name="ModifierOrder"/>
83+
<module name="RedundantModifier"/>
84+
<module name="AvoidNestedBlocks"/>
85+
<module name="EmptyBlock">
86+
<property name="option" value="text"/>
87+
<property name="tokens" value="LITERAL_CATCH"/>
88+
</module>
89+
<module name="EmptyBlock">
90+
<property name="tokens"
91+
value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
92+
</module>
93+
<module name="LeftCurly"/>
94+
<module name="NeedBraces"/>
95+
<module name="RightCurly">
96+
<property name="option" value="alone"/>
97+
</module>
98+
<module name="CovariantEquals"/>
99+
<module name="DefaultComesLast"/>
100+
<module name="EmptyStatement"/>
101+
<module name="EqualsHashCode"/>
102+
<module name="FallThrough"/>
103+
<module name="HiddenField">
104+
<property name="ignoreConstructorParameter" value="true"/>
105+
<property name="ignoreSetter" value="true"/>
106+
<property name="ignoreAbstractMethods" value="true"/>
107+
<property name="setterCanReturnItsClass" value="true"/>
108+
</module>
109+
<module name="IllegalThrows"/>
110+
<module name="InnerAssignment"/>
111+
<module name="ModifiedControlVariable"/>
112+
<module name="MultipleVariableDeclarations"/>
113+
<module name="NestedTryDepth"/>
114+
<module name="NestedIfDepth">
115+
<property name="max" value="2"/>
116+
</module>
117+
<module name="PackageDeclaration"/>
118+
<module name="ParameterAssignment"/>
119+
<module name="SimplifyBooleanExpression"/>
120+
<module name="SimplifyBooleanReturn"/>
121+
<module name="StringLiteralEquality"/>
122+
<module name="SuperClone"/>
123+
<module name="SuperFinalize"/>
124+
<module name="UnnecessaryParentheses"/>
125+
<module name="FinalClass"/>
126+
<module name="HideUtilityClassConstructor"/>
127+
<module name="InterfaceIsType"/>
128+
<module name="MutableException"/>
129+
<module name="ThrowsCount">
130+
<property name="max" value="3"/>
131+
</module>
132+
<module name="VisibilityModifier"/>
133+
<module name="BooleanExpressionComplexity"/>
134+
<module name="ClassDataAbstractionCoupling">
135+
<property name="max" value="10"/>
136+
</module>
137+
<module name="ClassFanOutComplexity">
138+
<property name="max" value="25"/>
139+
</module>
140+
<module name="JavaNCSS"/>
141+
<module name="ArrayTypeStyle"/>
142+
<module name="UpperEll"/>
143+
<module name="IllegalCatch"/>
144+
<module name="IllegalImport">
145+
<property name="illegalPkgs" value="net.jcip.annotations, javax.annotation"/>
146+
<property name="illegalClasses" value="edu.umd.cs.findbugs.annotations.CheckForNull"/>
147+
<property name="severity" value="error"/>
148+
</module>
149+
</module>
150+
<module name="FileTabCharacter">
151+
<property name="fileExtensions" value="jelly, java"/>
152+
</module>
153+
<module name="FileLength">
154+
<property name="fileExtensions" value="jelly, java"/>
155+
</module>
156+
<module name="SuppressWarningsFilter" />
157+
</module>

0 commit comments

Comments
 (0)