[JIRA] (JENKINS-46521) Non-multibranch pipelines do not have any changeset information

11 views
Skip to first unread message

drew.easley@logikcull.com (JIRA)

unread,
Nov 13, 2018, 6:42:02 AM11/13/18
to jenkinsc...@googlegroups.com
Drew Easley commented on Bug JENKINS-46521
 
Re: Non-multibranch pipelines do not have any changeset information

+1, We're seeing the same issue in our Jenkins instance.  Standard views show commit information, but Blue Ocean shows a hyphen for commit and branch being built. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

r.fuereder@xortex.com (JIRA)

unread,
Mar 21, 2019, 5:48:05 AM3/21/19
to jenkinsc...@googlegroups.com

stuartr@ea.com (JIRA)

unread,
Mar 21, 2019, 9:12:06 AM3/21/19
to jenkinsc...@googlegroups.com

Reinhold Füreder thanks for bringing this to my attention. Unfortunately this seems to be an issue with other SCMs too (I'm using p4-plugin).

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 11:48:06 AM3/21/19
to jenkinsc...@googlegroups.com

Blueocean just renders whatever the other scm providers ... provide

https://github.com/jenkinsci/jenkins/blob/2263ad03ab8aa481caa3918c8671b1d605514b15/core/src/main/java/hudson/scm/ChangeLogSet.java#L154-L169

So If, and I mean if, i'm reading p4 correctly, it should have it set https://github.com/jenkinsci/p4-plugin/blob/d9a96a4c4d1d72de188e9470ebaad68202a7aa72/src/main/java/org/jenkinsci/plugins/p4/changes/P4ChangeEntry.java#L343-L346

 

Feel free to zip up a job (only probably need 1 builds), or give me a sample scm url i can try it with, and I'll try to run it through the debugger to look more into it, but I'm 90% certain its the scm provider not blueocean.

 

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 11:56:03 AM3/21/19
to jenkinsc...@googlegroups.com

Oh i see the url in the description, i can probably poke at it.

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 11:58:06 AM3/21/19
to jenkinsc...@googlegroups.com

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 2:54:05 PM3/21/19
to jenkinsc...@googlegroups.com
 
Re: Non-multibranch pipelines do not have any changeset information

https://github.com/jenkinsci/blueocean-plugin/blob/70083b199cf41486dd0559520f0764205ea67ac3/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineRunImpl.java#L209-L216

Looks like blueocean pulls the commit id from the run, using the SCMRevisionAction, which at least svn doesn't seem to populate.

 

Stephen Connolly Jesse Glick looks like you worked on  SCMRevisionAction, is that the right way to pull commit info for a run?  it looks like its only implemented in workflow-multibranch-plugin, literate-plugin and yaml-project-plugin. Are other scm providers supposed to implement this?

jglick@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 3:27:03 PM3/21/19
to jenkinsc...@googlegroups.com

SCMRevisionAction is specific to multibranch builds and represents the one commit which the multibranch folder is tracking and from which Jenkinsfile etc. are taken—what checkout scm would check out. If you have a non-multibranch project, including freestyle as well as Pipeline, or even want to account for SCM information from other checkout (incl. git) steps used in a multibranch build, you can use RunWithSCM.getChangeSets and ChangeLogSet.Entry.getCommitId.

jglick@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 3:34:02 PM3/21/19
to jenkinsc...@googlegroups.com

To be clear, RunWithSCM.getChangeSets should represent the complete changelog for this build, including whatever commits might be included in the diff of SCMRevisionAction from the previous build to this one, assuming checkout scm was run at least once. From a technical perspective, this issue is not a bug at all—the changelog is displayed if there is any (which there would not be for e.g. build #1 or if you just retriggered a build manually); and the unique commit ID is displayed if there is any (which there would not be for a non-multibranch build, since these may check out zero or more repositories in various revisions according to whim). It is just a design decision what sorts of metadata you wish to display in builds under various circumstances that you think would best match user expectations.

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 4:38:02 PM3/21/19
to jenkinsc...@googlegroups.com

Hrm. And that that brings up another point, pipelines can have multiple scms hooked up to it (multiple git repos, git and svn, what have you)....

Maybe its better just to hide the column if its not a multi branch pipeline.

r.fuereder@xortex.com (JIRA)

unread,
Mar 22, 2019, 3:01:02 AM3/22/19
to jenkinsc...@googlegroups.com

Thanks for the insider/background information (and the hint in JENKINS-44869):

  • well, yes, actually I (therefore) have the commit ID (SVN revision or shortened GIT commit hash) as suffix of my therefore quite long build display number, e.g. "20170613-161100-rev134098" (i.e. "<date>-<time>-rev<SVN revision>")
  • and thus hiding the "Commit" column for a non-multi branch pipeline in favour of showing the full build display number in the BO's activity tab "Run" id column (see JENKINS-44869) would be ideal/fine for me

jenkins@gavinmogan.com (JIRA)

unread,
Apr 20, 2020, 2:56:06 PM4/20/20
to jenkinsc...@googlegroups.com
Gavin Mogan assigned an issue to Unassigned
 
Change By: Gavin Mogan
Assignee: Gavin Mogan
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages