orpiske commented on code in PR #13816:
URL: https://github.com/apache/camel/pull/13816#discussion_r1567014812


##########
pom.xml:
##########
@@ -338,6 +338,9 @@
                             
<Dockerfile.native-micro>SCRIPT_STYLE</Dockerfile.native-micro>
                             <Dockerfile.native>SCRIPT_STYLE</Dockerfile.native>
                             <Dockerfile>SCRIPT_STYLE</Dockerfile>
+                            <Jenkinsfile>SLASHSTAR_STYLE</Jenkinsfile>
+                            
<Jenkinsfile.matrix.platform>SLASHSTAR_STYLE</Jenkinsfile.matrix.platform>
+                            
<Jenkinsfile.matrix.jdk>SLASHSTAR_STYLE</Jenkinsfile.matrix.jdk>

Review Comment:
   We may remove these two lines



##########
Jenkinsfile:
##########
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+def MAVEN_PARAMS = "-B -e -fae -V -Dnoassembly -Dmaven.compiler.fork=true 
-Dsurefire.rerunFailingTestsCount=2 -Dfailsafe.rerunFailingTestsCount=1"
+def MAVEN_TEST_PARAMS = env.MAVEN_TEST_PARAMS ?: 
"-Dkafka.instance.type=local-strimzi-container -Dci.env.name=apache.org"
+def MAVEN_TEST_PARAMS_UBUNTU = env.MAVEN_TEST_PARAMS ?: 
"-Dci.env.name=apache.org"
+/*
+Below parameters are required for camel/core/camel-core module's test cases to 
pass on ppc64 and s390x
+- xpathExprGrpLimit: limits the number of groups an Xpath expression can 
contain 
+- xpathExprOpLimit: limits the number of operators an Xpath expression can 
contain
+*/
+def MAVEN_TEST_PARAMS_ALT_ARCHS = "-Djdk.xml.xpathExprGrpLimit=100 
-Djdk.xml.xpathExprOpLimit=2000"
+
+pipeline {
+
+    environment {
+        MAVEN_SKIP_RC = true
+    }
+
+    options {
+        buildDiscarder(
+            logRotator(artifactNumToKeepStr: '5', numToKeepStr: '10')
+        )
+        disableConcurrentBuilds()
+    }
+
+    parameters {
+        booleanParam(name: 'CLEAN', defaultValue: true, description: 'Perform 
the build in clean workspace')
+        booleanParam(name: 'VIRTUAL_THREAD', defaultValue: false, description: 
'Perform the build using virtual threads')
+        choice(name: 'PLATFORM_FILTER', choices: ['all', 'ppc64le', 's390x', 
'ubuntu'], description: 'Run on specific platform')
+        choice(name: 'JDK_FILTER', choices: ['all', 'jdk_17_latest', 
'jdk_21_latest'], description: 'Run on specific jdk')
+    }
+    agent none
+    stages {
+        stage('BuildAndTest') {
+            matrix {
+                agent {
+                    label "${PLATFORM}"
+                }
+                when { anyOf {
+                    expression { params.PLATFORM_FILTER == 'all' }
+                    expression { params.PLATFORM_FILTER == env.PLATFORM }
+                    expression { params.JDK_FILTER == 'all' }
+                    expression { params.JDK_FILTER == env.JDK_NAME }
+                } }
+                axes {
+                    axis {
+                        name 'JDK_NAME'
+                        values 'jdk_17_latest', 'jdk_21_latest'
+                    }
+                    axis {
+                        name 'PLATFORM'
+                        values 'ppc64le', 's390x', 'ubuntu'
+                    }
+                }
+                excludes {
+                    exclude {
+                        axis {
+                            name 'JDK_NAME'
+                            values 'jdk_21_latest'
+                        }
+                        axis {
+                            name 'PLATFORM'
+                            values 'ppc64le'
+                        }
+                    }
+                    exclude {
+                        axis {
+                            name 'JDK_NAME'
+                            values 'jdk_21_latest'
+                        }
+                        axis {
+                            name 'PLATFORM'
+                            values 's390x'
+                        }
+                    }
+                }
+                tools {
+                    jdk "${JDK_NAME}"
+                }
+                stages {
+                    stage('Clean workspace') {
+                        when {
+                            expression { params.CLEAN }
+                        }
+                        steps {
+                            sh 'git clean -fdx'
+                        }
+                    }
+
+                    stage('Build') {
+                        steps {
+                            echo "Do Build for ${PLATFORM}-${JDK_NAME}"
+                            sh 'java -version'
+                            sh "./mvnw -U $MAVEN_PARAMS 
-Dskip.camel.maven.plugin.tests -Darchetype.test.skip 
-Dmaven.test.skip.exec=true clean install"
+                        }
+                    }
+
+                    stage('Code Quality Review') {
+                        steps {
+                            script {
+                                if ("${PLATFORM}" == "ubuntu") {
+                                    withCredentials([string(credentialsId: 
'apache-camel-core', variable: 'SONAR_TOKEN')]) {
+                                        /*
+                                        * sh "./mvnw $MAVEN_PARAMS 
-Dsonar.host.url=https://sonarcloud.io 
-Dsonar.java.experimental.batchModeSizeInKB=2048 -Dsonar.organization=apache 
-Dsonar.projectKey=apache_camel -Dsonar.branch.name=$BRANCH_NAME 
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar"
+                                        */
+                                        echo "Code quality review ENABLED for 
${PLATFORM}"

Review Comment:
   This is a note for the community: we'll keep this one disabled until it is 
merged to avoid messing up with the sonar report. After the code is merged, 
I'll re-enable this. 



##########
pom.xml:
##########
@@ -338,6 +338,9 @@
                             
<Dockerfile.native-micro>SCRIPT_STYLE</Dockerfile.native-micro>
                             <Dockerfile.native>SCRIPT_STYLE</Dockerfile.native>
                             <Dockerfile>SCRIPT_STYLE</Dockerfile>
+                            <Jenkinsfile>SLASHSTAR_STYLE</Jenkinsfile>
+                            
<Jenkinsfile.matrix.platform>SLASHSTAR_STYLE</Jenkinsfile.matrix.platform>
+                            
<Jenkinsfile.matrix.jdk>SLASHSTAR_STYLE</Jenkinsfile.matrix.jdk>
                             
<Jenkinsfile.deploy>SLASHSTAR_STYLE</Jenkinsfile.deploy>
                             
<Jenkinsfile.dryrun>SLASHSTAR_STYLE</Jenkinsfile.dryrun>
                             
<Jenkinsfile.jdk17>SLASHSTAR_STYLE</Jenkinsfile.jdk17>

Review Comment:
   We may also remove this and the other 3 lines below. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to