Custom CI Page! (with Jenkins backbone)

Discussion in 'Resources' started by Ultimate_n00b, Nov 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Ultimate_n00b

    If you've used Jenkins, it isn't always very.. nice looking. Even after styling it, you just can't get it perfect. Because of that, and that I wanted a custom CI page, I made a small PHP script using the Jenkins api. Just replace the URL with your own.

    PHP:
    $xml simplexml_load_file('http://ci.breezeyboy.com/api/xml');
     
    foreach(
    $xml->job as $job) {
        echo 
    "<h2><a href=" "?project=" str_replace(" """$job->name) . ">" $job->name "</a></h2><hr>";
        
    $xml2 simplexml_load_file($job->url "api/xml");
        
    $xml3 simplexml_load_file($xml2->build->url "api/xml");
        foreach(
    $xml3->artifact as $artifact) {
            echo 
    "Latest build: " $artifact->displayPath;
            echo 
    '<br><a class="btn btn-default pull-right" href=' $xml3->url 'artifact/' $artifact->relativePath '>Download</a><br>';
        }
    }
    (as I use bootstrap, I used bootstrap classes to style it)

    Example.
     
    Ivan, iKeirNez, DSH105 and 2 others like this.
  2. Offline

    hawkfalcon

    Wow, that looks nice.
     
  3. Ultimate_n00b For the first time ever I love the look of jenkins. Good job :p
     
  4. Offline

    Ultimate_n00b

    Thanks! Though I do have to say, Bootstrap/Bootswatch helped a bit :p
     
  5. Offline

    Minecrell

  6. Offline

    Ultimate_n00b

  7. Offline

    Minecrell

    Yep, that's why I thought maybe you only want to show your projects on your website. ;)
     
  8. Offline

    xXSniperzzXx_SD

    Now i just need to figure out how to get Jenkins to install without giving me an error...
     
  9. Offline

    tenowg

    DSH105 likes this.
  10. Offline

    Ultimate_n00b

    Mine is actually a custom WordPress page. Oh, and I see how you modified it to grab all builds. I didn't put that in, as I'm trying to get it to zip all the files if there are more than one.

    all
    I changed mine a lot, you can see more project details, each build, download each build, see changed files, link to github commit, etc. I might post it on here, once I convert it from my WP page format.

    I changed the code in the first post to add all the different artifacts, not just the first one.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  11. Offline

    breezeyboy

    Minecrell
    Removed CommandsPlus
    Ultimate_n00b
    Jenkins already zips them:
    http://ci.breezeyboy.com/job/Player Lookup/lastSuccessfulBuild/artifact/*zip*/archive.zip
    Or
    http://ci.breezeyboy.com/job/Player Lookup/35/artifact/*zip*/archive.zip
    (Just an example, A simple code change.)
    And im working on a page, If anyone wants the vist it the url is http://files.breezeyboy.com/ci/ci.php and will change.

    EDIT: Also we should cache the xml files so the site loads faster?

    EDIT2: xXSniperzzXx_SD Need any help installing jenkins?
     
    Minecrell likes this.
  12. Offline

    Ultimate_n00b

    I use WordPress with a caching plugin which updates max five times a day, so I am good.
     
  13. Offline

    Ivan

    This is awesome, so much possibilities!
     
  14. Offline

    xXSniperzzXx_SD

    breezeyboy
    If you're offering, Then yes, but currently I don't have internet, So about 2 weeks from now...
     
  15. Offline

    Vexil

  16. Offline

    Ultimate_n00b

    If you're looking at mine I may have broken it. Seems like the caching broke.
     
  17. Offline

    gomeow

    very nice
     
  18. Offline

    Ultimate_n00b

    Scratch that, I fixed it. I'm working on a public version I can release, which contains the things which the one on my site currently has (each build with github info, advanced build info with stuff like changed files and maven repo, zip download for multiple artifacts, etc).
     
    BenCS_ likes this.
Thread Status:
Not open for further replies.

Share This Page