From 747b3c496408f0f6823fd15ba6344615bda8eb40 Mon Sep 17 00:00:00 2001 From: Enrique Mingorance Cano Date: Mon, 23 Nov 2020 09:19:58 +0100 Subject: [PATCH] BXMSPROD-1062 buil chain action usage on Jenkins (#1508) * BXMSPROD-1062 buil chain action usage * BXMSPROD-1062 buil chain action usage * Jenkinsfile adapted and old stages and properties files removed * Jenkinsfile adapted to single flow * all flows properly setup * upstream GA flow * npm install step removed * sonarAnalysis.stages restored * flow configurations adapted to build-chain tool 2.0 * BXMSPROD-1062 kiegroup/github-action-build-chain updated * BXMSPROD-1062 kiegroup/github-action-build-chain updated * BXMSPROD-1062 dependencies pointing to Ginxo as a temporary solution * BXMSPROD-1062 dependencies pointing to Ginxo as a temporary solution. GITHUB_TOKEN * BXMSPROD-1062 product-projects-dependencies.yaml moved here * stages and properties restored * droolsjbpm-tools added --- .ci/compilation-config.yaml | 43 +++++++ .ci/downstream-production-config.yaml | 9 ++ .ci/full-downstream-config.yaml | 48 ++++++++ .ci/product-projects-dependencies.yaml | 26 ++++ .ci/project-dependencies.yaml | 52 +++++--- .ci/pull-request-config.yaml | 2 +- .ci/upstream-config.yaml | 13 ++ .github/workflows/pull_request.yml | 2 +- .github/workflows/upstream.yml | 31 +++++ Jenkinsfile | 2 +- Jenkinsfile.buildchain | 158 +++++++++++++++++++++++++ 11 files changed, 368 insertions(+), 18 deletions(-) create mode 100644 .ci/compilation-config.yaml create mode 100644 .ci/downstream-production-config.yaml create mode 100644 .ci/full-downstream-config.yaml create mode 100644 .ci/product-projects-dependencies.yaml create mode 100644 .ci/upstream-config.yaml create mode 100644 .github/workflows/upstream.yml create mode 100644 Jenkinsfile.buildchain diff --git a/.ci/compilation-config.yaml b/.ci/compilation-config.yaml new file mode 100644 index 00000000000..1c4cc2d85d2 --- /dev/null +++ b/.ci/compilation-config.yaml @@ -0,0 +1,43 @@ +version: "2.0" + +dependencies: ./project-dependencies.yaml + +default: + build-command: + current: mvn -e -fae -nsu --builder smart --builder smart -T1C clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e --builder smart -T1C clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + downstream: mvn -e -nsu -fae --builder smart -T1C clean install -Dfull -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + after: + upstream: rm -rf ./* + +build: + - project: kiegroup/appformer + build-command: + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + archive-artifacts: + path: | + **/dashbuilder-runtime.war + + - project: kiegroup/drools + build-command: + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + + - project: kiegroup/optaplanner + build-command: + current: mvn -e -fae -nsu clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + downstream: mvn -e -nsu -fae clean install -Dfull -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + + - project: kiegroup/kie-wb-common + build-command: + current: mvn -e -fae -nsu clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + archive-artifacts: + path: | + **/target/screenshots/** + + - project: kiegroup/kie-docs + skip: true + + - project: kiegroup/kie-jpmml-integration + skip: true \ No newline at end of file diff --git a/.ci/downstream-production-config.yaml b/.ci/downstream-production-config.yaml new file mode 100644 index 00000000000..97c67def388 --- /dev/null +++ b/.ci/downstream-production-config.yaml @@ -0,0 +1,9 @@ +version: "2.0" + +dependencies: ./product-projects-dependencies.yaml + +default: + build-command: + current: mvn clean install -Dproductized=true -Dmaven.test.failure.ignore=true -Dwebdriver.firefox.bin=/opt/tools/firefox-60esr/firefox-bin -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + after: + upstream: rm -rf ./* \ No newline at end of file diff --git a/.ci/full-downstream-config.yaml b/.ci/full-downstream-config.yaml new file mode 100644 index 00000000000..ba08dd66054 --- /dev/null +++ b/.ci/full-downstream-config.yaml @@ -0,0 +1,48 @@ +version: "2.0" + +dependencies: ./project-dependencies.yaml + +default: + build-command: + current: mvn -e -nsu --builder smart -T1C clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e --builder smart -T1C clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + downstream: mvn -e -nsu clean install -Dfull -Pbusiness-central,wildfly,sourcemaps,no-showcase -Dcontainer=wildfly -Dcontainer.profile=wildfly -Dintegration-tests=true -Dcargo.ignore.failures=true -Dmaven.test.failure.ignore=true -Dmaven.test.redirectTestOutputToFile=true -Dgwt.compiler.localWorkers=1 -Dwebdriver.firefox.bin=/opt/tools/firefox-60esr/firefox-bin -Dgwt.skipCompilation=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + after: + upstream: rm -rf ./* + +build: + - project: kiegroup/appformer + build-command: + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + archive-artifacts: + path: | + **/dashbuilder-runtime.war + + - project: kiegroup/drools + build-command: + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + + - project: kiegroup/optaplanner + build-command: + current: mvn -e -fae -nsu clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + + - project: kiegroup/kie-wb-common + build-command: + current: mvn -e -nsu --builder smart -T1C clean install -Dfull -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + upstream: mvn -e clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + downstream: mvn -e -nsu clean install -Dfull -Pbusiness-central,wildfly,sourcemaps,no-showcase -Dcontainer=wildfly -Dcontainer.profile=wildfly -Dintegration-tests=true -Dcargo.ignore.failures=true -Dmaven.test.failure.ignore=true -Dmaven.test.redirectTestOutputToFile=true -Dgwt.compiler.localWorkers=1 -Dwebdriver.firefox.bin=/opt/tools/firefox-60esr/firefox-bin -Dgwt.skipCompilation=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + archive-artifacts: + path: | + **/target/screenshots/** + + - project: kiegroup/droolsjbpm-integration + build-command: + current: mvn -e -nsu -B --builder smart -T1C clean install -Dfull -Pjenkins-pr-builder -DskipTests -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + downstream: mvn -e -nsu clean install -Dfull -Pbusiness-central,wildfly,sourcemaps,no-showcase,jenkins-pr-builder -Dcontainer=wildfly -Dcontainer.profile=wildfly -Dintegration-tests=true -Dcargo.ignore.failures=true -Dmaven.test.failure.ignore=true -Dmaven.test.redirectTestOutputToFile=true -Dgwt.compiler.localWorkers=1 -Dwebdriver.firefox.bin=/opt/tools/firefox-60esr/firefox-bin -Dgwt.skipCompilation=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + + - project: kiegroup/kie-docs + skip: true + + - project: kiegroup/droolsjbpm-tools + skip: true \ No newline at end of file diff --git a/.ci/product-projects-dependencies.yaml b/.ci/product-projects-dependencies.yaml new file mode 100644 index 00000000000..e177b011612 --- /dev/null +++ b/.ci/product-projects-dependencies.yaml @@ -0,0 +1,26 @@ +version: "2.0" +extends: ./project-dependencies.yaml +dependencies: + - project: jboss-integration/izpack + + - project: jboss-integration/installer-commons + dependencies: + - project: jboss-integration/izpack + + - project: jboss-integration/rhba-boms + dependencies: + - project: kiegroup/optaplanner + + - project: jboss-integration/rhba + dependencies: + - project: kiegroup/kie-wb-distributions + - project: kiegroup/optaweb-employee-rostering + + - project: jboss-integration/rhba-installers + dependencies: + - project: jboss-integration/rhba + - project: jboss-integration/installer-commons + + - project: jboss-integration/bxms-patch-tools + dependencies: + - project: jboss-integration/rhba \ No newline at end of file diff --git a/.ci/project-dependencies.yaml b/.ci/project-dependencies.yaml index 8ebcc017c5b..b640e3aa4a3 100644 --- a/.ci/project-dependencies.yaml +++ b/.ci/project-dependencies.yaml @@ -1,4 +1,4 @@ -version: "1.0" +version: "2.0" dependencies: - project: kiegroup/lienzo-core @@ -35,13 +35,17 @@ dependencies: - project: kiegroup/optaplanner dependencies: - project: kiegroup/drools - mapping: - source: 7.x - target: master - project: kiegroup/jbpm - mapping: + mapping: + dependencies: + default: source: 7.x target: master + source: master + target: 7.x + exclude: + - kiegroup/optaweb-employee-rostering + - kiegroup/optaweb-vehicle-routing - project: kiegroup/kie-jpmml-integration dependencies: @@ -51,9 +55,6 @@ dependencies: - project: kiegroup/droolsjbpm-integration dependencies: - project: kiegroup/optaplanner - mapping: - source: master - target: 7.x - project: kiegroup/kie-jpmml-integration - project: kiegroup/openshift-drools-hacep @@ -86,9 +87,6 @@ dependencies: - project: kiegroup/drools-wb - project: kiegroup/drools - project: kiegroup/optaplanner - mapping: - source: master - target: 7.x - project: kiegroup/kie-soup - project: kiegroup/kie-wb-common - project: kiegroup/kie-wb-playground @@ -114,19 +112,43 @@ dependencies: - project: kiegroup/optaweb-employee-rostering dependencies: - project: kiegroup/optaplanner + mapping: + dependencies: + default: + source: 7.x + target: master + source: master + target: 7.x + exclude: + - kiegroup/optaweb-vehicle-routing + - kiegroup/optaplanner - project: kiegroup/optaweb-vehicle-routing dependencies: - project: kiegroup/optaplanner + mapping: + dependencies: + default: + source: 7.x + target: master + source: master + target: 7.x + exclude: + - kiegroup/optaweb-employee-rostering + - kiegroup/optaplanner - project: kiegroup/kie-wb-distributions dependencies: - project: kiegroup/kie-soup - project: kiegroup/drools - project: kiegroup/optaplanner - mapping: - source: master - target: 7.x - project: kiegroup/jbpm-wb - project: kiegroup/appformer - - project: kiegroup/kie-uberfire-extensions + - project: kiegroup/kie-uberfire-extensions + + - project: kiegroup/droolsjbpm-tools + dependencies: + - project: kiegroup/droolsjbpm-build-bootstrap + - project: kiegroup/jbpm + - project: kiegroup/drools + - project: kiegroup/kie-soup diff --git a/.ci/pull-request-config.yaml b/.ci/pull-request-config.yaml index 7eb3eed24af..fd5fa720159 100644 --- a/.ci/pull-request-config.yaml +++ b/.ci/pull-request-config.yaml @@ -1,4 +1,4 @@ -version: "1.0" +version: "2.0" dependencies: ./project-dependencies.yaml diff --git a/.ci/upstream-config.yaml b/.ci/upstream-config.yaml new file mode 100644 index 00000000000..19d77184f77 --- /dev/null +++ b/.ci/upstream-config.yaml @@ -0,0 +1,13 @@ +version: "1.0" + +dependencies: ./project-dependencies.yaml + +default: + build-command: + current: mvn clean install -DskipTests -Dgwt.compiler.skip=true -Dgwt.skipCompilation=true -Denforcer.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 + after: + upstream: rm -rf ./* + +build: + - project: kiegroup/kie-jpmml-integration + skip: true \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 90580467f33..ac11987a8ac 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -29,7 +29,7 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Build Chain ${{ matrix.java-version }} id: build-chain - uses: kiegroup/github-action-build-chain@v2.1 + uses: kiegroup/github-action-build-chain@v2.2 with: definition-file: https://raw.githubusercontent.com/${GROUP}/${PROJECT_NAME}/${BRANCH}/.ci/pull-request-config.yaml env: diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml new file mode 100644 index 00000000000..b76bfb53162 --- /dev/null +++ b/.github/workflows/upstream.yml @@ -0,0 +1,31 @@ +name: Upstream Flow + +on: [workflow_dispatch] + +jobs: + build-chain: + strategy: + matrix: + java-version: [8, 11] + fail-fast: true + runs-on: ubuntu-latest + name: Maven Build + steps: + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java-version }} + - name: Install takari + run: | + wget -P $M2_HOME/lib/ext https://repo1.maven.org/maven2/io/takari/aether/takari-local-repository/0.11.3/takari-local-repository-0.11.3.jar + wget -P $M2_HOME/lib/ext https://repo1.maven.org/maven2/io/takari/takari-filemanager/0.8.3/takari-filemanager-0.8.3.jar + wget -P $M2_HOME/lib/ext https://repo1.maven.org/maven2/io/takari/maven/takari-smart-builder/0.6.1/takari-smart-builder-0.6.1.jar + - name: Build Chain ${{ matrix.java-version }} + id: build-chain + uses: kiegroup/github-action-build-chain@master + with: + definition-file: https://raw.githubusercontent.com/${GROUP}/${PROJECT_NAME}/${BRANCH}/.ci/upstream-config.yaml + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + + \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index a14825d3338..0793504150f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -168,4 +168,4 @@ def isPR(){ def isCompile(){ return (JOB_NAME =~ /\/[a-z,A-Z\-\_0-9\.]*\.compile/).find(); -} +} \ No newline at end of file diff --git a/Jenkinsfile.buildchain b/Jenkinsfile.buildchain new file mode 100644 index 00000000000..585313d6579 --- /dev/null +++ b/Jenkinsfile.buildchain @@ -0,0 +1,158 @@ +@Library('jenkins-pipeline-shared-libraries')_ + +agentLabel = "${env.ADDITIONAL_LABEL?.trim() ? ADDITIONAL_LABEL : 'kie-rhel7 && kie-mem24g'} && !master" +additionalArtifactsToArchive = "${env.ADDITIONAL_ARTIFACTS_TO_ARCHIVE?.trim() ?: ''}" +additionalTimeout = "${env.ADDITIONAL_TIMEOUT?.trim() ?: 1200}" +additionalExcludedArtifacts = "${env.ADDITIONAL_EXCLUDED_ARTIFACTS?.trim() ?: ''}" +checkstyleFile = env.CHECKSTYLE_FILE?.trim() ?: null +findbugsFile = env.FINDBUGS_FILE?.trim() ?: null +pr_type = env.PR_TYPE?.trim() ?: null + +pipeline { + agent { + label agentLabel + } + tools { + maven 'kie-maven-3.6.3' + jdk 'kie-jdk1.8' + } + options { + timestamps () + timeout(time: additionalTimeout, unit: 'MINUTES') + } + stages { + stage('Initialize') { + steps { + sh 'printenv' + } + } + // executes a script that compresses the consoleText and attaches it to the mail + stage('build sh script') { + steps { + script { + mailer.buildLogScriptPR() + } + } + } + stage('Build projects') { + steps { + script { + def buildChainActionInfo = + isFDBP() ? [action: 'fd', file: 'downstream-production-config.yaml'] : + isFDB() ? [action: 'fd', file: 'full-downstream-config.yaml'] : + isPR() ? [action: 'pr', file: 'pull-request-config.yaml'] : + isCompile() ? [action: 'fd', file: 'compilation-config.yaml'] : + [action: 'pr', file: 'upstream-config.yaml'] + + withCredentials([string(credentialsId: 'kie-ci1-token', variable: 'GITHUB_TOKEN')]) { + sh "build-chain-action -token=${GITHUB_TOKEN} -df='https://raw.githubusercontent.com/\${GROUP}/droolsjbpm-build-bootstrap/\${BRANCH}/.ci/${buildChainActionInfo.file}' build ${buildChainActionInfo.action} -url=${env.ghprbPullLink}" + } + } + } + } + stage('Sonar analysis') { + tools { + jdk "kie-jdk11" + } + steps { + script { + if(isPR()) { + def gitURL = env.ghprbAuthorRepoGitUrl ?: env.GIT_URL + def project = util.getProjectGroupName(util.getProject(gitURL))[1] + if(["optaplanner", "drools", "appformer", "jbpm", "drools-wb", "kie-soup", "droolsjbpm-integration", "kie-wb-common", "openshift-drools-hacep", "optaweb-employee-rostering", "optaweb-vehicle-routing"].contains(project)) + { + dir("${env.WORKSPACE}") { + maven.runMavenWithSettingsSonar("771ff52a-a8b4-40e6-9b22-d54c7314aa1e", "-nsu generate-resources -Psonarcloud-analysis -Denforcer.skip=true", "SONARCLOUD_TOKEN", "sonar_analysis.maven.log") + } + } else { + println "Project ${project} shouldn't be analyzed by sonarcloud" + } + } else { + println "[INFO] No sonar analysis execution." + } + } + } + } + } + post { + fixed { + script { + mailer.sendEmail_fixedPR(pr_type) + } + } + aborted { + script { + mailer.sendEmail_abortedPR(pr_type) + } + } + failure { + sh '$WORKSPACE/trace.sh' + script { + mailer.sendEmail_failedPR(pr_type) + } + } + unstable { + script { + mailer.sendEmail_unstablePR(pr_type) + } + } + always { + script { + util.printGitInformationReport() + } + echo 'Generating JUnit report...' + junit allowEmptyResults: true, healthScaleFactor: 1.0, testResults: '**/target/*-reports/TEST-*.xml' + + echo 'Archiving logs...' + archiveArtifacts excludes: '**/target/checkstyle.log', artifacts: '**/*.maven.log,**/target/*.log', fingerprint: false, defaultExcludes: true, caseSensitive: true, allowEmptyArchive: true + + echo 'Archiving testStatusListener and screenshots artifacts...' + archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/testStatusListener*,**/target/screenshots/**', excludes: additionalExcludedArtifacts, fingerprint: false, defaultExcludes: true, caseSensitive: true + + echo 'Archiving wars...' + archiveArtifacts artifacts: '**/target/business-monitoring-webapp.war,**/target/business-central*wildfly*.war,**/target/business-central*eap*.war,**/target/kie-server-*ee7.war,**/target/kie-server-*webc.war,**/target/dashbuilder-runtime.war', fingerprint: false, defaultExcludes: true, caseSensitive: true, allowEmptyArchive: true + + echo 'Archiving zips...' + archiveArtifacts artifacts: '**/target/jbpm-server*dist*.zip', fingerprint: false, defaultExcludes: true, caseSensitive: true, allowEmptyArchive: true + + script { + if(additionalArtifactsToArchive) { + echo 'Archiving additional Artifacts ...' + archiveArtifacts allowEmptyArchive: true, artifacts: additionalArtifactsToArchive, excludes: additionalExcludedArtifacts, fingerprint: false, defaultExcludes: true, caseSensitive: true + } + } + + script { + if(findbugsFile) { + echo 'Findbugs reports ...' + findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: findbugsFile, unHealthy: '' + } + } + script { + if(checkstyleFile) { + echo 'Checkstyle reports ...' + checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: checkstyleFile, unHealthy: '' + } + } + } + cleanup { + cleanWs() + } + } +} + +def isFDBP(){ + return (JOB_NAME =~ /\/[a-z,A-Z\-\_0-9\.]*\.fdbp/).find(); +} + +def isFDB(){ + return (JOB_NAME =~ /\/[a-z,A-Z\-\_0-9\.]*\.fdb/).find(); +} + +def isPR(){ + return (JOB_NAME =~ /\/[a-z,A-Z\-\_0-9\.]*\.pr/).find(); +} + +def isCompile(){ + return (JOB_NAME =~ /\/[a-z,A-Z\-\_0-9\.]*\.compile/).find(); +} \ No newline at end of file