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

Update CCtray (cc.xml) to support Jenkins2 folders

      For situation when jobs have the same names but placed in different folders, cc.xml return the same "name" filed for all job, so this is lead to confusion.

      For example:

      Jobs:

      http://jenkins/job/Folder1/job/Build/
      http://jenkins/job/Folder1/job/Tests/
      http://jenkins/job/Folder2/job/Build/
      http://jenkins/job/Folder3/job/Tests/
      

      CCtray:

      <Project webUrl="http://jenkins/job/Folder1/job/Build/" name="Build" lastBuildLabel="63" lastBuildTime="2016-05-06T09:59:59Z" lastBuildStatus="Success" activity="Sleeping"/>
      <Project webUrl="http://jenkins/job/Folder1/job/Tests/" name="Tests" lastBuildLabel="25" lastBuildTime="2016-05-04T14:58:39Z" lastBuildStatus="Failure" activity="Sleeping"/>
      
      <Project webUrl="http://jenkins/job/Folder2/job/Build/" name="Build" lastBuildLabel="63" lastBuildTime="2016-05-06T09:59:59Z" lastBuildStatus="Success" activity="Sleeping"/>
      <Project webUrl="http://jenkins/job/Folder2/job/Tests/" name="Tests" lastBuildLabel="25" lastBuildTime="2016-05-04T14:58:39Z" lastBuildStatus="Failure" activity="Sleeping"/>
      

      So after import we will receive following jobs:

      Build
      Tests
      Build
      Tests
      

      Expected results:

      CCtray:

      <Project webUrl="http://jenkins/job/Folder1/job/Build/" name="Folder1/Build" lastBuildLabel="63" lastBuildTime="2016-05-06T09:59:59Z" lastBuildStatus="Success" activity="Sleeping"/>
      <Project webUrl="http://jenkins/job/Folder1/job/Tests/" name="Folder1/Tests" lastBuildLabel="25" lastBuildTime="2016-05-04T14:58:39Z" lastBuildStatus="Failure" activity="Sleeping"/>
      
      <Project webUrl="http://jenkins/job/Folder2/job/Build/" name="Folder2/Build" lastBuildLabel="63" lastBuildTime="2016-05-06T09:59:59Z" lastBuildStatus="Success" activity="Sleeping"/>
      <Project webUrl="http://jenkins/job/Folder2/job/Tests/" name="Folder2Tests" lastBuildLabel="25" lastBuildTime="2016-05-04T14:58:39Z" lastBuildStatus="Failure" activity="Sleeping"/>
      

      List of jobs after import:

      Folder1/Build
      Folder1/Tests
      Folder2/Build
      Folder2/Tests
      

          [JENKINS-34641] Update CCtray (cc.xml) to support Jenkins2 folders

          Andy Mrichko created issue -

          Daniel Beck added a comment -

          I recommend you look into using the Jenkins remote API rather than this obsolete format (when I looked for the format definition for JENKINS-32274 I had to look on archive.org, it's that obsolete). I doubt anyone in the project actually cares about this.

          Daniel Beck added a comment - I recommend you look into using the Jenkins remote API rather than this obsolete format (when I looked for the format definition for JENKINS-32274 I had to look on archive.org, it's that obsolete). I doubt anyone in the project actually cares about this.

          It may be obsolete-ish, but it is really to easy to use and things like the GitHub Authorization plugin expose it without requiring username and password if you want.

          Christian Höltje added a comment - It may be obsolete-ish, but it is really to easy to use and things like the GitHub Authorization plugin expose it without requiring username and password if you want.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170811 ] New: JNJira + In-Review [ 184054 ]

          Sorin Sbarnea added a comment -

          danielbeck `cc.xml` is the only portable way to get build status information from a build system. That's the only "API" that works across multiple build-systems. In the real world people do have to get status from multiple build-systems, not only Jenkins. I monitor Jenkins, Travis, Bamboo, ... and many others.

          People wrote build-status client applications for a huge range of platforms: Linux, MacOS, Windows, iOS, Android and even browser plugins. You can't expect all these developers to have to implement a specific API just for Jenkins.

          I hope this explains it why I do think that cc.xml is not really something that's supposed to go away in the foreseeable future.

          Sorin Sbarnea added a comment - danielbeck `cc.xml` is the only portable way to get build status information from a build system. That's the only "API" that works across multiple build-systems. In the real world people do have to get status from multiple build-systems, not only Jenkins. I monitor Jenkins, Travis, Bamboo, ... and many others. People wrote build-status client applications for a huge range of platforms: Linux, MacOS, Windows, iOS, Android and even browser plugins. You can't expect all these developers to have to implement a specific API just for Jenkins. I hope this explains it why I do think that cc.xml is not really something that's supposed to go away in the foreseeable future.

          Daniel Beck added a comment -

          ssbarnea Not sure what your point is. I've not seen a lot of mention of this feature around the Jenkins community, and the format appears to be obsolete based on the format definition being not even around anymore, so my recommendation is based off the expectation that, unless you're willing to do it yourself, there probably won't be a fix coming from the usual suspects any time soon.

          Besides, Jenkins supports plugins, and writing a "cc.xml" plugin would probably be a nice beginner's exercise, or sample code plugin, if it ever got dropped from Jenkins (without being moved into a plugin, as we typically do).

          Daniel Beck added a comment - ssbarnea Not sure what your point is. I've not seen a lot of mention of this feature around the Jenkins community, and the format appears to be obsolete based on the format definition being not even around anymore, so my recommendation is based off the expectation that, unless you're willing to do it yourself, there probably won't be a fix coming from the usual suspects any time soon. Besides, Jenkins supports plugins, and writing a "cc.xml" plugin would probably be a nice beginner's exercise, or sample code plugin, if it ever got dropped from Jenkins (without being moved into a plugin, as we typically do).

          Sorin Sbarnea added a comment -

          In fact I was looking at Jenkins code as I wanted to implemented the fix myself and do my first core contribution

          I was a little bit surprised to find that the only occurrence of cc.xml in the code was here:

          core/src/main/resources/hudson/model/View/builds.jelly
          42:          <a href="cc.xml">${%Export as plain XML}</a>
          

          PS. As Java (or Jelly) is not among by "native" languages, it may take a bit of time to figure out exactly what I have to do to make it work. You are welcomed to assign the bug to me as I don't expect others to work on it.

          Sorin Sbarnea added a comment - In fact I was looking at Jenkins code as I wanted to implemented the fix myself and do my first core contribution I was a little bit surprised to find that the only occurrence of cc.xml in the code was here: core/src/main/resources/hudson/model/View/builds.jelly 42: <a href= "cc.xml" >${%Export as plain XML}</a> PS. As Java (or Jelly) is not among by "native" languages, it may take a bit of time to figure out exactly what I have to do to make it work. You are welcomed to assign the bug to me as I don't expect others to work on it.

          Daniel Beck added a comment - https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/View/cc.xml.jelly
          Daniel Beck made changes -
          Labels Original: cctray folders New: cc.xml cctray folders
          Stephen Connolly made changes -
          Link New: This issue is related to JENKINS-35167 [ JENKINS-35167 ]

            Unassigned Unassigned
            amrichko Andy Mrichko
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: