[Answered] Question to DBO Staff about CI Servers

Discussion in 'BukkitDev Information and Feedback' started by Xaymar, May 22, 2013.

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

    Xaymar

    So, one of my projects was kicked to under moderation, and after asking (you guys could really include the proper reason in your f****** first message), I was told that I am not linking to a CI Server.

    What does the DBO Staff think is a "CI Server", or is "required" to be "classified" as a "CI Server"?
    Obviously, whatever I linked to is apparently not a "CI Server", although it constantly builds new versions when I push changes to Github.
     
  2. Offline

    Skyshayde

    What did you use to build new versions when you push changes to GitHub?
     
  3. Offline

    Xaymar

    A minimalistic approach in Java, written to launch only when there is an incoming connection to a specific ip and port. The only front-end it has is it's own client. It has no current name but I guess you could call it "MinCI", as it really doesn't use much CPU and RAM.
    So the only thing I can expose to the web are the files it builds. For anything else, I'd need to be able to link the CI-Client, which I'd rather not do, as then the purpose of "MinCI" is nullified.
     
  4. Offline

    TnT

    Xaymar
    Do you have a link to the website or software source so we can see for ourselves?
     
  5. Offline

    Xaymar

    TnT

    Code:
    import java.io.File;
    import java.io.FilenameFilter;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
     
    public class App {
        private static String stBaseProjectDir = "/var/repo/";
        private static String stBaseUploadDir = "/var/www/***/htdocs/plugins/";
        private static String stMavenDirectory = "/etc/java/maven/bin/";
       
        public static void main( String[] args ) {
            if (args.length >= 1) {
                String stProject = args[0];
               
                Runtime rt = Runtime.getRuntime();
                try {
                    Process prc = rt.exec(stMavenDirectory + "mvn compile", null, new File(stBaseProjectDir + stProject + "/"));
                    prc.waitFor();
                } catch (IOException ex) {
                    Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
                } catch (InterruptedException ex) {
                    Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
                }
               
                File dir = new File(stBaseProjectDir + stProject + "/target/");
                File [] files = dir.listFiles(new FilenameFilter() {
                    @Override
                    public boolean accept(File file, String name) {
                        return name.endsWith(".jar");
                    }
                });
               
                for (File jarFile : files) {
                    jarFile.renameTo(new File(stBaseUploadDir + stProject + "/" + jarFile.getName()));
                }
            } else {
                Logger.getLogger(App.class.getName()).severe("Not enough parameters.");
            }
        }
    }
    That is the java application, the rest is nginx rules, shell scripts and iptables triggers. This way it uses way less resources, since it will just free them when done, unlike a 24/7 running Java server application(I'm looking at you Jenkins).
     
  6. Offline

    TnT

    Xaymar
    Wait, so you wrote a website that acts like a CI and you wish to use that?
     
  7. Offline

    Xaymar

    TnT

    No, I didn't write a website that acts like a CI, the entire machine is acting like a CI. The only thing it exposes is it's recent builds, anything else would require me to add stuff to the shell scripts. (They are currently very basic and ignore all changelogs and just pull the new changes)
     
  8. Offline

    metalhedd

    I support this man, for doing what I would have done if jenkins wasn't the path of least resistance. I don't see any reason a CI server has to be jenkins (or whatever competitors are out there). at the end of the day they all just compile your code and serve it up.
     
  9. Offline

    Xaymar

    TnT

    So, any changes to the continuous integration server rule that would disallow this type of server?
     
  10. Offline

    Xaymar

  11. Offline

    TnT

    At this time, your makeshift CI server is not an acceptable CI.

    If this decision changes we will let you know.
     
  12. Offline

    Skyshayde

    What exactly is necessary for it to be an acceptable CI?
     
  13. Offline

    rtainc

    Jenkins has absolutely no security either; you can just push some dangerous code to Github, and it will build on there. What's the difference between Jenkins and his CI server?
     
  14. Offline

    Xaymar

    Well, it uses more Memory and CPU Power than it actually needs. And also requires horrific amounts of harddrive space for things that it shouldn't need. Oh and it has a fancy web-frontend that you don't actually need as a dev.

    Wait, why do you declare it a makeshift CI? It fills all the "requirements"(more like guidelines) for a CI, so it is not a makeshift CI. This "makeshift" CI has the same features as the commercial one that is used at the place I work at, with the exception of that it doesn't understand Lua plugins. Please don't go around calling things makeshift unless you actually know it.
     
    JazzaG likes this.
  15. Offline

    Gravity

    But you're reinventing the wheel!
    (just kidding)

    Is the server in question currently in use? If so could you please link it so we could take a look?
    To clarify, I'm not saying the decision on this is going to change, just that I'd like to see how the system is set up.
     
  16. Offline

    Xaymar

    It is located here, and anyone wanting to receive new builds with their related changelogs / who-broke-this-shit(blame) would have recieved them through the running mailserver. Unstable(non-recommended) builds are not accessible from there without a password, as I don't want people to complain about changes before they actually go live.
     
  17. Offline

    Gravity

    What? I don't understand what you mean. Where is it that I can get the changelogs or build info?


    Wait... but doesn't that defeat the purpose of running a CI server? The whole point is to get changes out there so they can be tested without having people compile it themselves.
     
  18. Offline

    Xaymar

    Sending an email to the mailing list at ci@realitybends.de with the Subject "Subscribe" or "Unsubscribe" would automatically have registered you to the mailing list for the CI. For anyone else not registered, theres GitHubs own Commit log.

    What you just described is a build server. Not so far from a CI but still far away, as build servers can be manually triggered, and don't need a hook into any code repository.
    Also this is a precaution against those users that think that I can work with a wasteland of a ticket, as those seem to be always using the latest builds, even if they are using experimental changes.
     
  19. Offline

    ZachBora

  20. Offline

    Gravity

    Not.. really. I'm using that definition because that's what you have - a build server. Continuous Integration technically refers a system which runs tests and verifies that changes are good to go. The accepted meaning, at least around here, is somewhere where you can get builds that are compiled as new, experimental changes are pushed.

    That's all irrelevant, though. My point in bringing that up is that you're effectively removing the need for the system except as something to bypass our approval process. It has no intrinsic value if it's not for development builds, which is what we've specifically created our CI rule to allow. If you only make public builds that you "recommend", why would you not just upload those builds to BukkitDev? That is precisely what our file system is for. The CI policy was created because we would like to give people a way to have bleeding, developer, possibly unstable builds available to the public.
     
  21. Offline

    Xaymar

    ZachBora

    That link only shows the built versions, anything else was sent by mail, to prevent having to run a costly web-frontend.

    Gravity

    That would mean that the commercial CI that I mimic with mine is not a CI. The only difference between mine and the commercial one is that it doesn't support lua plugins. In fact, in the commercial one everything was done via email (even the files), since that saves a lot of cpu power and memory, as you only have to create and send it once.
    Not that it matters, since the answer is no anyway.
     
  22. Offline

    ZachBora

    Xaymar How can you keep track of changes if it only sends emails. What if I want an older build prior to the bugged build? If you can't afford a front-end with multiple versions that show the changes and link to commits it's not worth it. When I go on a Jenkins, I download the most recent build that is successful. If I have issues with it, I'll check which commit seem to have broken it and download the build prior to that commit.

    You don't have that, all you have is what I would expect to see on bukkitdev.
     
  23. Offline

    Xaymar

    You click the link in the email that says "get build list" and click send. It would have then send you a list of all builds that it knows of. Clicking "view" / "download" on a build would then send you the email containing the build information for that build. As I said, it can do what the commercial one can, it just doesn't have a costly web-frontend.

    Another reason to not show all builds, as I often commit changes that would change things only partially because I overlooked something. And then you're going to have to check every build made for every commit inbetween the working and the broken commit until it works. For example the upgrade for Inception from 1.5.2-R0.1[R1] to 1.5.2-R0.1[R2] took a lot of rewriting and refactoring, and the builds were successful but broken for some of those commits.

    Edit: But as I said, that setup is now useless and is going to be deleted and I'm going to use the company wide CI for my plugin now.
     
  24. Offline

    Gravity

    Sounds more like an issue of when you should push code to me. I never push things I know have errors in them or don't work.
     
  25. Offline

    Xaymar

    I'm not sure I understand what you are trying to tell me. Why would you prefer your local repository over the remote repository? Your local one is prone to damage, while the remote one is stored somewhere safe, probably even across multiple systems. I'd be more than happy to tell you that I didn't have a problem with my local repository being damaged, but my HDDs disagree with you.
     
  26. Offline

    ZachBora

    Xaymar If the code doesn't compile, I guess you could branch it and once it works merge it with the main.
     
Thread Status:
Not open for further replies.

Share This Page