Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24141

SCM with non-AbstractProject, revisited

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      JENKINS-23365 made it possible to use SCM from other contexts. But there are still some SCM-oriented things stuck in AbstractProject/AbstractBuild which ought to be generalized.

      • AbstractBuild.getChangeSets (as used by project-changes.jelly) does not implement any method. Either this should be pushed up into Run so that it can be used more generally (simple though an awkward introduction of SCM specifics into Run); or SCMTriggerItem should add getChangeSets(Run) (more sensible architecturally, though awkward since it could not have a generic type for the build).
      • getCulprits and hasParticipant would seem to apply to any build with changes.
      • AbstractProject.doRssChangelog could be moved elsewhere and use getChangeSets.
      • View.AsynchPeople could use getChangeSets.

      Possibly there needs to be an interface for a Run with changes, tied somehow to SCMTriggerItem and with some default methods?

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Perhaps also need to add SCM.buildEnvVars(Run, FilePath, Map<String,String>).

            Show
            jglick Jesse Glick added a comment - Perhaps also need to add SCM.buildEnvVars(Run, FilePath, Map<String,String>) .
            Hide
            vorobievalex Alexander Vorobiev added a comment -
            Show
            vorobievalex Alexander Vorobiev added a comment - Per http://stackoverflow.com/questions/30398465/how-to-get-culprits-or-committers-inside-a-jenkins-workflow-with-one-or-more-scm this blocks https://issues.jenkins-ci.org/browse/JENKINS-34763 . Is it still correct? I see JENKINS-34763 as the main blocker on the way to Jenkins pipeline. Can this be prioritized?
            Hide
            abayer Andrew Bayer added a comment -

            Jesse Glick - so I don't get the point of getChangeSets in the first place. Unless I'm missing something, it's only ever an empty list or a singleton list with getChangeSet() as the one entry. Do we really need to keep it?

            Show
            abayer Andrew Bayer added a comment - Jesse Glick - so I don't get the point of getChangeSets in the first place. Unless I'm missing something, it's only ever an empty list or a singleton list with getChangeSet() as the one entry. Do we really need to keep it?
            Hide
            abayer Andrew Bayer added a comment - - edited

            Ah, it's more relevant over in WorkflowRun. Why not just make getChangeSets() part of the SCMTriggerItem interface as is?

            Show
            abayer Andrew Bayer added a comment - - edited Ah, it's more relevant over in WorkflowRun . Why not just make getChangeSets() part of the SCMTriggerItem interface as is?
            Hide
            abayer Andrew Bayer added a comment -

            ...duh. Because SCMTriggerItem goes on the Job, not the Run.

            Show
            abayer Andrew Bayer added a comment - ...duh. Because SCMTriggerItem goes on the Job , not the Run .
            Hide
            abayer Andrew Bayer added a comment -
            Show
            abayer Andrew Bayer added a comment - Initial WIP PR up at https://github.com/jenkinsci/jenkins/pull/2730
            Hide
            abayer Andrew Bayer added a comment -

            Initial version of workflow-job PR up at https://github.com/jenkinsci/workflow-job-plugin/pull/35 as well

            Show
            abayer Andrew Bayer added a comment - Initial version of workflow-job PR up at https://github.com/jenkinsci/workflow-job-plugin/pull/35 as well
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            core/src/main/java/hudson/model/AbstractBuild.java
            core/src/main/java/hudson/model/AbstractProject.java
            core/src/main/java/hudson/model/Job.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/jenkins/scm/RunWithSCM.java
            http://jenkins-ci.org/commit/jenkins/bd844821413de7a0d72f45756b52ce45b78da16b
            Log:
            [WIP JENKINS-24141] First work on abstracting out changelogs

            Need to add tests, but first need to determine if this actually makes
            sense as I've implemented it.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Job.java core/src/main/java/hudson/model/View.java core/src/main/java/jenkins/scm/RunWithSCM.java http://jenkins-ci.org/commit/jenkins/bd844821413de7a0d72f45756b52ce45b78da16b Log: [WIP JENKINS-24141] First work on abstracting out changelogs Need to add tests, but first need to determine if this actually makes sense as I've implemented it.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            core/src/main/java/hudson/model/AbstractBuild.java
            core/src/main/java/hudson/model/AbstractProject.java
            core/src/main/java/hudson/model/Job.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/hudson/scm/SCM.java
            core/src/main/java/jenkins/scm/RunWithSCM.java
            test/src/test/java/hudson/model/AbstractBuildTest.java
            test/src/test/java/hudson/tasks/LogRotatorTest.java
            http://jenkins-ci.org/commit/jenkins/2f5ca1a7a167be27aab5d5c69f71a02ee5507ba6
            Log:
            Merge pull request #2730 from abayer/jenkins-24141

            JENKINS-24141 Pull ChangeLogSet-related logic out of AbstractBuild

            Compare: https://github.com/jenkinsci/jenkins/compare/1c52d910edc4...2f5ca1a7a167

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: core/src/main/java/hudson/model/AbstractBuild.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Job.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/scm/SCM.java core/src/main/java/jenkins/scm/RunWithSCM.java test/src/test/java/hudson/model/AbstractBuildTest.java test/src/test/java/hudson/tasks/LogRotatorTest.java http://jenkins-ci.org/commit/jenkins/2f5ca1a7a167be27aab5d5c69f71a02ee5507ba6 Log: Merge pull request #2730 from abayer/jenkins-24141 JENKINS-24141 Pull ChangeLogSet-related logic out of AbstractBuild Compare: https://github.com/jenkinsci/jenkins/compare/1c52d910edc4...2f5ca1a7a167
            Hide
            jglick Jesse Glick added a comment -

            IIUC this is now Resolved/Fixed towards 2.60, right?

            Show
            jglick Jesse Glick added a comment - IIUC this is now Resolved/Fixed towards 2.60, right?
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            http://jenkins-ci.org/commit/workflow-job-plugin/5a72cab6c219491c62624e3971187d30beee1122
            Log:
            JENKINS-24141 Implement RunWithSCMMixIn.RunWithSCM

            Downstream of https://github.com/jenkinsci/jenkins/pull/2730

            More work to go, but this is the initial work.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java http://jenkins-ci.org/commit/workflow-job-plugin/5a72cab6c219491c62624e3971187d30beee1122 Log: JENKINS-24141 Implement RunWithSCMMixIn.RunWithSCM Downstream of https://github.com/jenkinsci/jenkins/pull/2730 More work to go, but this is the initial work.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            Jenkinsfile
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
            src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunTest.java
            http://jenkins-ci.org/commit/workflow-job-plugin/70f444c6b696f84aeac9bd04239803ec73a2f4ad
            Log:
            Merge pull request #35 from abayer/jenkins-24141

            JENKINS-24141 Implement RunWithSCMMixIn.RunWithSCM

            Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/666a7102c6ef...70f444c6b696

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: Jenkinsfile pom.xml src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunTest.java http://jenkins-ci.org/commit/workflow-job-plugin/70f444c6b696f84aeac9bd04239803ec73a2f4ad Log: Merge pull request #35 from abayer/jenkins-24141 JENKINS-24141 Implement RunWithSCMMixIn.RunWithSCM Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/666a7102c6ef...70f444c6b696
            Hide
            jglick Jesse Glick added a comment -

            Released as workflow-job 2.12.

            Show
            jglick Jesse Glick added a comment - Released as workflow-job 2.12.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/RecipientProviderUtilities.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProviderTest.java
            http://jenkins-ci.org/commit/email-ext-plugin/6cce465feef63af825fb4098483c3584c3251dfa
            Log:
            JENKINS-24141 Switch to using RunWithSCM for getCulprits logic

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/RecipientProviderUtilities.java src/test/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProviderTest.java http://jenkins-ci.org/commit/email-ext-plugin/6cce465feef63af825fb4098483c3584c3251dfa Log: JENKINS-24141 Switch to using RunWithSCM for getCulprits logic
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java
            src/main/java/hudson/plugins/emailext/plugins/recipients/RecipientProviderUtilities.java
            src/main/java/hudson/plugins/emailext/plugins/trigger/FailureTrigger.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProviderTest.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProviderTest.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProviderTest.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProviderTest.java
            src/test/java/hudson/plugins/emailext/plugins/recipients/MockUtilities.java
            http://jenkins-ci.org/commit/email-ext-plugin/dfb6bbbb995057049d9bb47b28a40621ebefeaef
            Log:
            Merge pull request #155 from abayer/jenkins-24141

            JENKINS-24141 Switch to using RunWithSCM for getCulprits logic

            Compare: https://github.com/jenkinsci/email-ext-plugin/compare/f0cc12d26052...dfb6bbbb9950

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java src/main/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProvider.java src/main/java/hudson/plugins/emailext/plugins/recipients/RecipientProviderUtilities.java src/main/java/hudson/plugins/emailext/plugins/trigger/FailureTrigger.java src/test/java/hudson/plugins/emailext/plugins/recipients/CulpritsRecipientProviderTest.java src/test/java/hudson/plugins/emailext/plugins/recipients/DevelopersRecipientProviderTest.java src/test/java/hudson/plugins/emailext/plugins/recipients/FailingTestSuspectsRecipientProviderTest.java src/test/java/hudson/plugins/emailext/plugins/recipients/FirstFailingBuildSuspectsRecipientProviderTest.java src/test/java/hudson/plugins/emailext/plugins/recipients/MockUtilities.java http://jenkins-ci.org/commit/email-ext-plugin/dfb6bbbb995057049d9bb47b28a40621ebefeaef Log: Merge pull request #155 from abayer/jenkins-24141 JENKINS-24141 Switch to using RunWithSCM for getCulprits logic Compare: https://github.com/jenkinsci/email-ext-plugin/compare/f0cc12d26052...dfb6bbbb9950

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              jglick Jesse Glick
              Votes:
              23 Vote for this issue
              Watchers:
              34 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: