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

Source code not shown when using folders plugin

    XMLWordPrintable

Details

    Description

      When viewing coverage as a top level project, it is possible to view the source code highlighted with coverage. If a folder is used (or multiple levels of folder), then the plugin reports not being able find the source code to display.

       

      We have used the same project just moved to a folder and then the source is not visible.

       

      The source can be viewed locally, but then the project have to be cloned and built locally.

       

      With the folder plugin, there are multiple /job/ entries (one per folder) which could be confusing the resolving of the link in CoverageResult.java

      Attachments

        Activity

          stoesselt Torben Stößel added a comment - - edited

          I can report similar behavior. We have a multi-branch Bitbucket source project and C++ code. We generate Cobertura report with gcovr. 

          Used environment: Ubuntu 16.04, Jenkins core 2.150.2, Cobertura 1.12.1 and also tried 1.13. If that matters, Folder Plugin 6.7.

          I know that it worked some time ago, I did an update of jenkins core and all plugins and to be honest, I cannot undo this to figure out when the problem shows up. The strange is that source code of master branch is properly shown. Source code of all other branches is not shown. This is also why I think that the overall configuration is correct.

           

          EDIT: I have to withdraw my argument, that it works properly on master branch. After a new build of the master branch, it did not work either.

          stoesselt Torben Stößel added a comment - - edited I can report similar behavior. We have a multi-branch Bitbucket source project and C++ code. We generate Cobertura report with gcovr.  Used environment: Ubuntu 16.04, Jenkins core 2.150.2, Cobertura 1.12.1 and also tried 1.13. If that matters, Folder Plugin 6.7. I know that it worked some time ago, I did an update of jenkins core and all plugins and to be honest, I cannot undo this to figure out when the problem shows up. The strange is that source code of master branch is properly shown. Source code of all other branches is not shown. This is also why I think that the overall configuration is correct.   EDIT: I have to withdraw my argument, that it works properly on master branch. After a new build of the master branch, it did not work either.
          pt_tothepower2 Phil Taylor added a comment -

          Following a change in our build process, we are now seeing the source.

          The change has been that the paths do not include going up a directory ( i.e. ../ ).

          The versions of plugins have not changed

           

          pt_tothepower2 Phil Taylor added a comment - Following a change in our build process, we are now seeing the source. The change has been that the paths do not include going up a directory ( i.e. ../ ). The versions of plugins have not changed  

          I can confirm now, that the problem is about going up a directory. In my case I was executing the plugin from `tests/build/gcc`. In the cobertura xml file, the sources information is `../../..`. My workaround is to execute the plugin from repository root and to replace the sources information.

           

          Nonetheless, the plugin should be able to cope with relative path parts.

          stoesselt Torben Stößel added a comment - I can confirm now, that the problem is about going up a directory. In my case I was executing the plugin from `tests/build/gcc`. In the cobertura xml file, the sources information is `../../..`. My workaround is to execute the plugin from repository root and to replace the sources information.   Nonetheless, the plugin should be able to cope with relative path parts.

          People

            jeffpearce Jeff Pearce
            pt_tothepower2 Phil Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: