Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning configuration from homebrew bottle builder #408

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 33 additions & 31 deletions jenkins-scripts/dsl/_configs_/OSRFBrewCompilation.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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')
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions jenkins-scripts/dsl/brew_release.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work without OSRFBrewCompilationAnyGitHub and the "osrf/homebrew-simulation" parameter? I'm not sure how it would attach to pull requests without that configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, changes are broken indeed. I tried to solve them in c7053c3. The new diff seems much better:

--- generic-release-homebrew_triggered_bottle_builder.xml	2021-10-06 17:00:03.366135806 +0200
+++ /tmp/generic-release-homebrew_triggered_bottle_builder.xml	2021-10-06 16:59:21.924941433 +0200
@@ -261,37 +261,6 @@
             <saveOutput>false</saveOutput>
             <disabled>false</disabled>
         </hudson.plugins.emailext.ExtendedEmailPublisher>
-        <io.jenkins.plugins.analysis.core.steps.IssuesRecorder>
-            <analysisTools>
-                <io.jenkins.plugins.analysis.warnings.Clang>
-                    <id></id>
-                    <name></name>
-                    <pattern></pattern>
-                    <reportEncoding></reportEncoding>
-                    <skipSymbolicLinks>false</skipSymbolicLinks>
-                </io.jenkins.plugins.analysis.warnings.Clang>
-            </analysisTools>
-            <sourceCodeEncoding></sourceCodeEncoding>
-            <ignoreQualityGate>false</ignoreQualityGate>
-            <ignoreFailedBuilds>true</ignoreFailedBuilds>
-            <referenceJobName></referenceJobName>
-            <healthy>0</healthy>
-            <unhealthy>0</unhealthy>
-            <minimumSeverity>
-                <name>LOW</name>
-            </minimumSeverity>
-            <filters></filters>
-            <isEnabledForFailure>false</isEnabledForFailure>
-            <isAggregatingResults>false</isAggregatingResults>
-            <isBlameDisabled>false</isBlameDisabled>
-            <qualityGates>
-                <io.jenkins.plugins.analysis.core.util.QualityGate>
-                    <threshold>1</threshold>
-                    <type>TOTAL</type>
-                    <status>WARNING</status>
-                </io.jenkins.plugins.analysis.core.util.QualityGate>
-            </qualityGates>
-        </io.jenkins.plugins.analysis.core.steps.IssuesRecorder>
         <hudson.tasks.ArtifactArchiver>
             <artifacts>pkgs/*</artifacts>
             <allowEmptyArchive>true</allowEmptyArchive>

DISABLE_TESTS,
NO_SUPPORTED_BRANCHES,
DISABLE_GITHUB_INTEGRATION)
DISABLE_GITHUB_INTEGRATION,
DISABLE_WARNINGS)
GenericRemoteToken.create(bottle_job_builder)

bottle_job_builder.with
Expand Down