You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2023/08/17 08:56:29 UTC

[struts] 01/01: Uses Java 17 to perform Code Quality check

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch fix/code-quality-on-java17
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 2db7c0439e559b4c00ea860d117ec04ea5c738bf
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Thu Aug 17 10:56:20 2023 +0200

    Uses Java 17 to perform Code Quality check
---
 .github/workflows/maven.yml |  3 +--
 Jenkinsfile                 | 24 ++++++++++++------------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 3d1d1cf07..5efaba9b9 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -49,10 +49,9 @@ 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
       - 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 }}
diff --git a/Jenkinsfile b/Jenkinsfile
index 1a5c56c20..bced1a82c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -44,7 +44,7 @@ pipeline {
         }
         stage('Test') {
           steps {
-            sh './mvnw -B test'
+            sh './mvnw -B verify -Pcoverage -DskipAssembly'
           }
           post {
             always {
@@ -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 {
@@ -79,7 +89,7 @@ pipeline {
         }
         stage('Test') {
           steps {
-            sh './mvnw -B verify -Pcoverage -DskipAssembly'
+            sh './mvnw -B test'
           }
           post {
             always {
@@ -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 {