Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<properties>
<springdoc.version>1.6.11</springdoc.version>
<java.version>17</java.version>
<codestyle.checks.file>./codestyle/checkstyle_checks.xml</codestyle.checks.file>
<codestyle.suppressions.file></codestyle.suppressions.file>
</properties>

<dependencies>
Expand Down
50 changes: 50 additions & 0 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@


pipeline {
agent any
stages {
stage('Build'){
steps{
echo 'Download dependencies'
withMaven(maven:"maven-387", publisherStrategy: 'EXPLICIT'){
sh "cd api \n\
mvn install -P default"
}
}
}
stage('Static code analysis'){
steps{
script{
echo 'Static code analysis'
sh "cd api\n\
mvn install -P static-code-analysis\n\
echo \"static code analysis finished\""
}

echo "Reading static analysis report"
recordIssues enabledForFailure: true, failOnError: false, tool:checkStyle(pattern: "**/target/checkstyle-result.xml")
recordIssues enabledForFailure: true, failOnError: false, tool:spotBugs(pattern: "**/target/spotbugs*.xml")
recordIssues enabledForFailure: true, failOnError: false, tool:cpd(pattern: "**/target/cpd.xml")
recordIssues enabledForFailure: true, failOnError: false, tool:pmdParser(pattern: "**/target/pmd.xml")
}
}

stage('Test'){
steps{
script{
echo 'Test'
sh "cd api\n\
mvn install -P tests"
}

publishHTML([
allowMissing: true,
keepAll:true,
alwaysLinkToLastBuild: true,
reportDir: 'api/target/site/jacoco',
reportFiles: 'index.html',
reportName: 'Jacoco coverage HTML report'])
}
}
}
}