diff --git a/jenkins-scripts/dsl/_configs_/OSRFBrewCompilation.groovy b/jenkins-scripts/dsl/_configs_/OSRFBrewCompilation.groovy index 367a6731d..e5a2e6613 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFBrewCompilation.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFBrewCompilation.groovy @@ -11,7 +11,7 @@ import javaposse.jobdsl.dsl.Job */ class OSRFBrewCompilation extends OSRFOsXBase { - static void create(Job job, enable_testing = true) + static void create(Job job, enable_testing = true, enable_warnings = true) { OSRFOsXBase.create(job) @@ -26,39 +26,41 @@ class OSRFBrewCompilation extends OSRFOsXBase 'Pull request URL (osrf/homebrew-simulation) pointing to a pull request.') } - publishers - { - configure { project -> - project / publishers / 'io.jenkins.plugins.analysis.core.steps.IssuesRecorder' { - analysisTools { - 'io.jenkins.plugins.analysis.warnings.Clang' { - id() - name() - pattern() - reportEncoding() - skipSymbolicLinks(false) + if (enable_warnings) { + publishers + { + configure { project -> + project / publishers / 'io.jenkins.plugins.analysis.core.steps.IssuesRecorder' { + analysisTools { + 'io.jenkins.plugins.analysis.warnings.Clang' { + id() + name() + pattern() + reportEncoding() + skipSymbolicLinks(false) + } } - } - sourceCodeEncoding() - ignoreQualityGate(false) - ignoreFailedBuilds(true) - referenceJobName() - healthy(0) - unhealthy(0) - minimumSeverity { - name('LOW') - } - filters { } - isEnabledForFailure(false) - isAggregatingResults(false) - isBlameDisabled(false) + sourceCodeEncoding() + ignoreQualityGate(false) + ignoreFailedBuilds(true) + referenceJobName() + healthy(0) + unhealthy(0) + minimumSeverity { + name('LOW') + } + filters { } + isEnabledForFailure(false) + isAggregatingResults(false) + isBlameDisabled(false) - qualityGates { - 'io.jenkins.plugins.analysis.core.util.QualityGate' { - threshold(1) - type('TOTAL') - status('WARNING') + qualityGates { + 'io.jenkins.plugins.analysis.core.util.QualityGate' { + threshold(1) + type('TOTAL') + status('WARNING') + } } } } diff --git a/jenkins-scripts/dsl/_configs_/OSRFBrewCompilationAnyGitHub.groovy b/jenkins-scripts/dsl/_configs_/OSRFBrewCompilationAnyGitHub.groovy index 09edef762..591a02655 100644 --- a/jenkins-scripts/dsl/_configs_/OSRFBrewCompilationAnyGitHub.groovy +++ b/jenkins-scripts/dsl/_configs_/OSRFBrewCompilationAnyGitHub.groovy @@ -15,9 +15,10 @@ class OSRFBrewCompilationAnyGitHub String github_repo, boolean enable_testing = true, ArrayList supported_branches = [], - boolean enable_github_pr_integration = true) + boolean enable_github_pr_integration = true, + boolean enable_warnings = true) { - OSRFBrewCompilation.create(job, enable_testing) + OSRFBrewCompilation.create(job, enable_testing, enable_warnings) GenericAnyJobGitHub.create(job, github_repo, supported_branches, diff --git a/jenkins-scripts/dsl/brew_release.dsl b/jenkins-scripts/dsl/brew_release.dsl index 64d5ee969..111001be1 100644 --- a/jenkins-scripts/dsl/brew_release.dsl +++ b/jenkins-scripts/dsl/brew_release.dsl @@ -10,8 +10,9 @@ bottle_builder_job_name = 'generic-release-homebrew_triggered_bottle_buil directory_for_bottles = 'pkgs' def DISABLE_TESTS = false -def NO_SUPPORTED_BRANCHES = [] +def DISABLE_WARNINGS = false def DISABLE_GITHUB_INTEGRATION = false +def NO_SUPPORTED_BRANCHES = [] /* release.py @@ -121,12 +122,12 @@ release_job.with // ------------------------------------------------------------------- // 2. BREW bottle creation MATRIX job from pullrequest def bottle_job_builder = matrixJob(bottle_builder_job_name) -// set enable_github_pr_integration flag to false so we can customize trigger behavior OSRFBrewCompilationAnyGitHub.create(bottle_job_builder, "osrf/homebrew-simulation", DISABLE_TESTS, NO_SUPPORTED_BRANCHES, - DISABLE_GITHUB_INTEGRATION) + DISABLE_GITHUB_INTEGRATION, + DISABLE_WARNINGS) GenericRemoteToken.create(bottle_job_builder) bottle_job_builder.with