Skip to content

Commit

Permalink
Merge pull request #730 from apache/fix/code-quality-on-java17
Browse files Browse the repository at this point in the history
Uses Java 17 to perform Code Quality check
  • Loading branch information
lukaszlenart authored Aug 17, 2023
2 parents 2e0764f + 433d9c4 commit 44f0a1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
distribution: adopt
java-version: ${{ matrix.java }}
- name: Build with Maven on Java ${{ matrix.java }}
if: matrix.java != '11'
run: mvn -B -V -DskipAssembly test --no-transfer-progress
if: matrix.java != '17'
run: mvn -B -V -DskipAssembly verify --no-transfer-progress
- name: Code coverage on Java ${{ matrix.java }}
if: matrix.java == '11'
if: matrix.java == '17'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
Expand Down
25 changes: 12 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pipeline {
}
stage('Test') {
steps {
sh './mvnw -B test'
sh './mvnw -B verify -Pcoverage -DskipAssembly'
}
post {
always {
Expand All @@ -53,6 +53,16 @@ pipeline {
}
}
}
stage('Code Quality') {
when {
branch 'master'
}
steps {
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar'
}
}
}
}
post {
always {
Expand All @@ -79,7 +89,7 @@ pipeline {
}
stage('Test') {
steps {
sh './mvnw -B verify -Pcoverage -DskipAssembly'
sh './mvnw -B test'
}
post {
always {
Expand All @@ -88,16 +98,6 @@ pipeline {
}
}
}
stage('Code Quality') {
when {
branch 'master'
}
steps {
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar'
}
}
}
}
post {
always {
Expand Down Expand Up @@ -125,7 +125,6 @@ pipeline {
stage('Test') {
steps {
sh './mvnw -B test'
// step([$class: 'JiraIssueUpdater', issueSelector: [$class: 'DefaultIssueSelector'], scm: scm])
}
post {
always {
Expand Down

0 comments on commit 44f0a1b

Please sign in to comment.