Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISH-9578 Gradle spotbugs #99

Merged
Merged
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
14 changes: 1 addition & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,14 @@ pipeline {
}
stages {

stage('Checkout master') {
steps {
script {
checkout changelog: false, poll: true, scm: [$class: 'GitSCM',
branches: [[name: "master"]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'payara-devops-github-personal-access-token-as-username-password', url:"https://github.com/payara/ecosystem-gradle.git"]]]
}
}
}
stage('Build') {
steps {
script {
echo '*#*#*#*#*#*#*#*#*#*#*#*# Building SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
sh '''
ls -lrt
cd payara-micro-gradle-plugin
gradle clean build -x check
gradle clean build -x check
'''
echo '*#*#*#*#*#*#*#*#*#*#*#*# Built SRC *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#'
}
Expand Down
16 changes: 16 additions & 0 deletions payara-micro-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'maven-publish'
id 'java'
id 'java-gradle-plugin'
id 'com.github.spotbugs' version '5.0.14' // Add SpotBugs plugin
}

group = 'fish.payara.gradle.plugins'
Expand All @@ -28,6 +29,21 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}

// SpotBugs Configuration
spotbugs {
toolVersion = '4.2.3' // Use the latest stable version
effort = 'max' // Use maximum effort for more detailed analysis
reportLevel = 'low' // Report all issues (low, medium, high)
ignoreFailures = true // Set to true if you want the build to continue even if there are violations
}

tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
xml.enabled = true // Enable XML report generation
html.enabled = false // Enable HTML report generation
}
}

test {
useJUnitPlatform()
testLogging {
Expand Down