Merge pull request #12 from kemitix/no-snapshot-deps
Use non-SNAPSHOT versions of mon and conditional
This commit is contained in:
commit
5d9b672dda
4 changed files with 23 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
||||||
final String publicRepo = 'https://github.com/kemitix/'
|
final String publicRepo = 'https://github.com/kemitix/'
|
||||||
final String mvn = "mvn --batch-mode --update-snapshots --errors"
|
final String mvn = "mvn --batch-mode --update-snapshots --errors"
|
||||||
final dependenciesSupportJDK = 9
|
final dependenciesSupportJDK = 10
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
@ -9,16 +9,22 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
||||||
sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test"
|
sh "${mvn} clean compile checkstyle:checkstyle pmd:pmd test"
|
||||||
// Code Coverage to Codacy
|
|
||||||
sh "${mvn} jacoco:report com.gavinmogan:codacy-maven-plugin:coverage " +
|
|
||||||
"-DcoverageReportFile=target/site/jacoco/jacoco.xml " +
|
|
||||||
"-DprojectToken=`$JENKINS_HOME/codacy/token` " +
|
|
||||||
"-DapiToken=`$JENKINS_HOME/codacy/apitoken` " +
|
|
||||||
"-Dcommit=`git rev-parse HEAD`"
|
|
||||||
// Code Coverage to Jenkins
|
|
||||||
jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class'
|
|
||||||
// PMD to Jenkins
|
// PMD to Jenkins
|
||||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Report Coverage') {
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
||||||
|
// Code Coverage to Jenkins
|
||||||
|
jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Report Checkstyle') {
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'maven', jdk: 'JDK 1.8') {
|
||||||
// Checkstyle to Jenkins
|
// Checkstyle to Jenkins
|
||||||
step([$class: 'hudson.plugins.checkstyle.CheckStylePublisher',
|
step([$class: 'hudson.plugins.checkstyle.CheckStylePublisher',
|
||||||
pattern: '**/target/checkstyle-result.xml',
|
pattern: '**/target/checkstyle-result.xml',
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -21,10 +21,10 @@
|
||||||
<jgit.version>5.0.2.201807311906-r</jgit.version>
|
<jgit.version>5.0.2.201807311906-r</jgit.version>
|
||||||
<junit.version>5.2.0</junit.version>
|
<junit.version>5.2.0</junit.version>
|
||||||
<assertj.version>3.11.1</assertj.version>
|
<assertj.version>3.11.1</assertj.version>
|
||||||
<mon.version>DEV-SNAPSHOT</mon.version>
|
<mon.version>0.11.0</mon.version>
|
||||||
<mockito.version>2.21.0</mockito.version>
|
<mockito.version>2.21.0</mockito.version>
|
||||||
<java-semver.version>0.9.0</java-semver.version>
|
<java-semver.version>0.9.0</java-semver.version>
|
||||||
<conditional.version>DEV-SNAPSHOT</conditional.version>
|
<conditional.version>0.7.0</conditional.version>
|
||||||
<digraph-dependency.basePackage>net.kemitix.gitdb</digraph-dependency.basePackage>
|
<digraph-dependency.basePackage>net.kemitix.gitdb</digraph-dependency.basePackage>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ class GitDBRepo {
|
||||||
) {
|
) {
|
||||||
final GitTreeReader treeFilter = new GitTreeReader(repository).treeFilter(key);
|
final GitTreeReader treeFilter = new GitTreeReader(repository).treeFilter(key);
|
||||||
return streamTree(branchRef, treeFilter).flatMap(s ->
|
return streamTree(branchRef, treeFilter).flatMap(s ->
|
||||||
Result.swap(s.findFirst()
|
Result.invert(s.findFirst()
|
||||||
.map(NamedRevBlob::blobAsString)
|
.map(NamedRevBlob::blobAsString)
|
||||||
.map(Maybe::just)
|
.map(Maybe::just)
|
||||||
.orElseGet(Maybe::nothing)));
|
.orElseGet(Maybe::nothing)));
|
||||||
|
|
|
@ -114,7 +114,7 @@ final class LocalGitDBImpl implements GitDB, LocalGitDB {
|
||||||
public Result<Maybe<GitDBBranch>> branch(final String name) {
|
public Result<Maybe<GitDBBranch>> branch(final String name) {
|
||||||
return Result.flatMapMaybe(
|
return Result.flatMapMaybe(
|
||||||
Result.of(() -> Maybe.maybe(repository.findRef(name))),
|
Result.of(() -> Maybe.maybe(repository.findRef(name))),
|
||||||
refMaybe -> Result.swap(refMaybe.map(branchInit)));
|
refMaybe -> Result.invert(refMaybe.map(branchInit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue