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

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Mar 3, 2021

Made a quick draft on the change that should allow disable warnings configuration in brew bottle builder, issue #407. Seems to me like we are not using any of the GitHub configurations in the GitHubAny class so I removed it and use the BrewCompilation adding the option of disabling warnings. We are also losing the github checkout but it is my impression that is not being really used by the scripts.

I just run a quick diff on the XML generated with the old and the new DSL:

--- /tmp/generic-release-homebrew_triggered_bottle_builder.xml	2021-03-03 16:05:30.930462814 +0100
+++ generic-release-homebrew_triggered_bottle_builder.xml	2021-03-03 16:13:59.332425202 +0100
@@ -19,11 +19,6 @@
                     <defaultValue></defaultValue>
                     <description>Pull request URL (osrf/homebrew-simulation) pointing to a pull request.</description>
                 </hudson.model.StringParameterDefinition>
-                <hudson.model.StringParameterDefinition>
-                    <name>sha1</name>
-                    <defaultValue>main</defaultValue>
-                    <description>commit or refname to build. To manually use a branch: origin/$branch_name</description>
-                </hudson.model.StringParameterDefinition>
             </parameterDefinitions>
         </hudson.model.ParametersDefinitionProperty>
         <hudson.plugins.throttleconcurrents.ThrottleJobProperty>
@@ -37,9 +32,6 @@
             <useJobPriority>true</useJobPriority>
             <priority>300</priority>
         </jenkins.advancedqueue.priority.strategy.PriorityJobProperty>
-        <com.coravy.hudson.plugins.github.GithubProjectProperty>
-            <projectUrl>https://github.com/osrf/homebrew-simulation/</projectUrl>
-        </com.coravy.hudson.plugins.github.GithubProjectProperty>
         <jenkins.advancedqueue.priority.strategy.PriorityJobProperty>
             <useJobPriority>true</useJobPriority>
             <priority>100</priority>
@@ -50,6 +42,7 @@
             </projectNameList>
         </hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
     </properties>
+    <scm class='hudson.scm.NullSCM'></scm>
     <canRoam>false</canRoam>
     <disabled>false</disabled>
     <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
@@ -183,9 +176,8 @@
                 </hudson.plugins.emailext.plugins.trigger.FixedTrigger>
             </configuredTriggers>
             <contentType>default</contentType>
-            <defaultSubject>$PROJECT_NAME - Branch: $GIT_BRANCH (#$BUILD_NUMBER) - $BUILD_STATUS!</defaultSubject>
-            <defaultContent>$JOB_DESCRIPTION 
-$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
+            <defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
+            <defaultContent>$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
 
 ${BUILD_FAILURE_ANALYZER, includeTitle=true, includeIndications=true, useHtmlFormat=false}
 
@@ -261,37 +253,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>
@@ -367,29 +328,5 @@
         <artifactDaysToKeep>-1</artifactDaysToKeep>
         <artifactNumToKeep>10</artifactNumToKeep>
     </logRotator>
-    <scm class='hudson.plugins.git.GitSCM'>
-        <userRemoteConfigs>
-            <hudson.plugins.git.UserRemoteConfig>
-                <refspec>+refs/pull/*:refs/remotes/origin/pr/* +refs/heads/*:refs/remotes/origin/*</refspec>
-                <url>https://github.com/osrf/homebrew-simulation.git</url>
-            </hudson.plugins.git.UserRemoteConfig>
-        </userRemoteConfigs>
-        <branches>
-            <hudson.plugins.git.BranchSpec>
-                <name>${sha1}</name>
-            </hudson.plugins.git.BranchSpec>
-        </branches>
-        <configVersion>2</configVersion>
-        <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
-        <gitTool>Default</gitTool>
-        <extensions>
-            <hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
-                <relativeTargetDir>homebrew-simulation</relativeTargetDir>
-            </hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
-        </extensions>
-        <browser class='hudson.plugins.git.browser.GithubWeb'>
-            <url>https://github.com/osrf/homebrew-simulation/</url>
-        </browser>
-    </scm>
     <authToken></authToken>
 </matrix-project>

It needs testing in the buildfarm.

@j-rivero j-rivero requested a review from scpeters March 3, 2021 15:20
@@ -121,12 +120,7 @@ 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>

@j-rivero j-rivero requested a review from scpeters October 6, 2021 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants