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

Support OpenGrok as SCM Browser for Perforce

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      We use OpenGrok as source browser. Unfortunately, there is no way to link SCM changes to OpenGrok from Jenkins. It would be great if there was a plugin similar to the the CVS support for OpenGrok provided under JENKINS-7044

        Attachments

          Activity

          Hide
          p4paul Paul Allen added a comment -

          I had a quick look at adding this, most of the work is done except I am not familiar with OpenGrok. Would you be willing to send me some sample urls so I can check the end-point/params correct? I would need the following:

          View a file
          Diff a file with an earlier revision
          View a job/issue
          View a change-set

          Thanks,
          Paul

          Show
          p4paul Paul Allen added a comment - I had a quick look at adding this, most of the work is done except I am not familiar with OpenGrok. Would you be willing to send me some sample urls so I can check the end-point/params correct? I would need the following: View a file Diff a file with an earlier revision View a job/issue View a change-set Thanks, Paul
          Hide
          netappbluedevil NetAppBlueDevil added a comment -

          Using <> markers to note values

          View a file

          http://<opengrok-server>/source/xref/<opengrok-project-name>/<filepath-within-depot>
          So, if the file in P4 is
          //depot/production/project/main/dir1/dir2/file
          filepath-within-depot would be
          dir1/dir2/file

          File diff with earlier version

          http://<opengrok-server>/source/diff/<opengrok-project-name>/build.properties?r2=%2F<opengrok-project-name>%2<filepath-within-depot-url-encoded>%40<p4-change>&r1=%2F<opengrok-project-name>%2F<filepath-within-depot-url-encoded>%40<p4-change>

          NOTE
          %2F - URL encoded /
          %40 - URL encoded @

          View a job/issue
          View a change-set

          For these 2 it looks like we have customized our version of OpenGrok to reference these to our internal tools that track issues and related changesets.

          From the Opengrok source, it doesn't look like there are any paths/servlets that would make sense to be handling change number as the only query input or a bug/issue number as the same
          https://github.com/OpenGrok/OpenGrok/blob/50c60fa3feefb22293e30dfba92e0d571db5cd6b/web/WEB-INF/web.xml

          This issue would seem to support the idea that this is not available as a feature
          https://github.com/OpenGrok/OpenGrok/issues/392

          Show
          netappbluedevil NetAppBlueDevil added a comment - Using <> markers to note values View a file http://<opengrok-server>/source/xref/<opengrok-project-name>/<filepath-within-depot> So, if the file in P4 is //depot/production/project/main/dir1/dir2/file filepath-within-depot would be dir1/dir2/file File diff with earlier version http://<opengrok-server>/source/diff/<opengrok-project-name>/build.properties?r2=%2F<opengrok-project-name>%2<filepath-within-depot-url-encoded>%40<p4-change>&r1=%2F<opengrok-project-name>%2F<filepath-within-depot-url-encoded>%40<p4-change> NOTE %2F - URL encoded / %40 - URL encoded @ View a job/issue View a change-set For these 2 it looks like we have customized our version of OpenGrok to reference these to our internal tools that track issues and related changesets. From the Opengrok source, it doesn't look like there are any paths/servlets that would make sense to be handling change number as the only query input or a bug/issue number as the same https://github.com/OpenGrok/OpenGrok/blob/50c60fa3feefb22293e30dfba92e0d571db5cd6b/web/WEB-INF/web.xml This issue would seem to support the idea that this is not available as a feature https://github.com/OpenGrok/OpenGrok/issues/392
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/browsers/OpenGrokBrowser.java
          src/main/resources/org/jenkinsci/plugins/p4/browsers/OpenGrokBrowser/config.jelly
          http://jenkins-ci.org/commit/p4-plugin/a7e739d924001df4b9fcfc7bf87d68ec111164ec
          Log:
          OpenGrok Browser (untested)

          Without an OpenGrok server/test environment I have had to base this on
          the job details. The diff @change is not possible as the previous
          change is not known, instead I have used #rev and #rev-1.

          JENKINS-19568

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/browsers/OpenGrokBrowser.java src/main/resources/org/jenkinsci/plugins/p4/browsers/OpenGrokBrowser/config.jelly http://jenkins-ci.org/commit/p4-plugin/a7e739d924001df4b9fcfc7bf87d68ec111164ec Log: OpenGrok Browser (untested) Without an OpenGrok server/test environment I have had to base this on the job details. The diff @change is not possible as the previous change is not known, instead I have used #rev and #rev-1. JENKINS-19568
          Hide
          p4paul Paul Allen added a comment -

          1.0.16 - Basic support added
          (please open a new JIRA issues/features as required)

          Show
          p4paul Paul Allen added a comment - 1.0.16 - Basic support added (please open a new JIRA issues/features as required)

            People

            Assignee:
            p4paul Paul Allen
            Reporter:
            netappbluedevil NetAppBlueDevil
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: