• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin

      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

          [JENKINS-19568] Support OpenGrok as SCM Browser for Perforce

          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

          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

          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

          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

          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

          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

          Paul Allen added a comment -

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

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

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

              Created:
              Updated:
              Resolved: