Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. How to introduce Continuous Integration?

How to introduce Continuous Integration?

Scheduled Pinned Locked Moved Design and Architecture
businesstoolstutorialquestion
18 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    pasztorpisti wrote:

    A bat file is unfortunately hard to monitor (no web interface to look at with a browser)

    ECHO "Starting unit-test" >/var/www/CIprogress.htm

    Custom applications are hard to customize, and a batch-file is easily extended. Anyone who can write a console-application using VB.NET can extend it's functionality. I'll put you a progress-bar in a tray-icon to follow the progress of the batch-file, if required :)

    pasztorpisti wrote:

    Currently we use a custom CI server (written in C++), its pure and simple,

    Simpeler than what I suggested? :)

    Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

    P Offline
    P Offline
    pasztorpisti
    wrote on last edited by
    #8

    How do you start the script? A CI system can be started from any machine from a browser. You cant start it multiple times by accident. You have a nice page with colors with a list of successful/failed builds. The build starts automatically on submit. You can implement most of these from batch files, but these batch files become uglier then C++ code quickly! Another reason I usually prefer a single binary solution is that script systems (especially heterogeneous ones) are much more error prone.

    L 1 Reply Last reply
    0
    • B Bernhard Hiller

      Continuous Integration with its automated builds and test is often seen as an important process/tool in software development, especially in agile enviroments. In our company, we want to introduce it now. There are some tools available, some of them even freely. And the respective web sites use to claim that they are easy to use. But in a lecture, I heard that setting up CI is not easy at all, a lot of money could be wasted, and it's better to get a consultant for that... What are your experiences with introducing CI? What was easy, what was complicated? And: what came first - (manual) processes or the tool?

      B Offline
      B Offline
      BobJanova
      wrote on last edited by
      #9

      If you are using a standard language, and you already have automated tests (unit tests, and automatable system tests) which use a standard framework, e.g. JUnit and Ant, then CI is pretty easy to set up. If you're using a less conventional language like Python or Ruby you would probably need to create at least a plugin if not a system yourself. CI is very valuable in a medium to large project, I strongly recommend you get it set up.

      B P 2 Replies Last reply
      0
      • P pasztorpisti

        How do you start the script? A CI system can be started from any machine from a browser. You cant start it multiple times by accident. You have a nice page with colors with a list of successful/failed builds. The build starts automatically on submit. You can implement most of these from batch files, but these batch files become uglier then C++ code quickly! Another reason I usually prefer a single binary solution is that script systems (especially heterogeneous ones) are much more error prone.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #10

        pasztorpisti wrote:

        How do you start the script?

        Like any other, although the Windows Task Scheduler might be handy. Or make it a post-build option from the IDE. It's as easy as starting any GUI-less executable.

        pasztorpisti wrote:

        A CI system can be started from any machine from a browser.

        The argument that it does builds for multiple platforms would have been better. It's relative easy to start an executable using ASP.NET.

        pasztorpisti wrote:

        but these batch files become uglier then C++ code quickly!

        ..I do not see how anyone could keep a tree with source-code tidy, if they can't even do so with a simple script. An off-the shelf product does have advantages, you're right. And yes, it does provide some features that would cost some time (and thus money) to implement if you need them. And yes, for larger teams it is recommended to go for an existing product. Especially since no-one will be responsible for maintaining the script, and it'll grow into a number of hacks from various employees. The most decisive limitation here would be the budget.

        Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

        P 1 Reply Last reply
        0
        • L Lost User

          pasztorpisti wrote:

          How do you start the script?

          Like any other, although the Windows Task Scheduler might be handy. Or make it a post-build option from the IDE. It's as easy as starting any GUI-less executable.

          pasztorpisti wrote:

          A CI system can be started from any machine from a browser.

          The argument that it does builds for multiple platforms would have been better. It's relative easy to start an executable using ASP.NET.

          pasztorpisti wrote:

          but these batch files become uglier then C++ code quickly!

          ..I do not see how anyone could keep a tree with source-code tidy, if they can't even do so with a simple script. An off-the shelf product does have advantages, you're right. And yes, it does provide some features that would cost some time (and thus money) to implement if you need them. And yes, for larger teams it is recommended to go for an existing product. Especially since no-one will be responsible for maintaining the script, and it'll grow into a number of hacks from various employees. The most decisive limitation here would be the budget.

          Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

          P Offline
          P Offline
          pasztorpisti
          wrote on last edited by
          #11

          Choose whatever option you like, and please try them before you make suggestions and tell your opinion. We tried scripts, prepackaged product, and the current option and now we are happier than ever. Choose the option that is suitable for you and minimizes the maintenance work you need to invest! Good luck!

          1 Reply Last reply
          0
          • P pasztorpisti

            Our builds are quite complicated, multiplatform, multi-machine, and sometimes even massive data processing is split to separate machines. If your build is a single machine build with a single log file as an output your problem is much easier to solve. Here is what we find useful in a CI system: - A web interface through which you can check the result of builds, the log files, and a button which can be used to start or queue up a build. - scheduled builds - builds that are triggered automatically when someone uploads new code to your version control system - sending mails about the results to a few fixed addresses and to those who submitted the latest changes in the version control system since the last successful build (blamelist). automated tests are not in my list of important things because the config file of our build system is just a set of tasks that are in a dependency graph, each task is a list of commands to execute on one of the machines. automatic testing is just plus one command after running the commands that create the build. Storing a copy of each build to a storage machine is also just an additional command that runs a python script to do the job. Some companies hire a build engineer for this task, you can also do that if build maintenance is very important. Actually we found CI very useful, especially since our main development platform is Windows and we want automatic tests immediately after submitting C++ code the version control system and it has to compile with visual C++, g++, and llvm compilers as well. Data errors are also often caught by CI.

            B Offline
            B Offline
            Bernhard Hiller
            wrote on last edited by
            #12

            Thanks for your comments. Also I find the points you mentioned useful. But I'd include some automated tests (actually lots of regression testing required, but who wants to do them...).

            P 1 Reply Last reply
            0
            • B BobJanova

              If you are using a standard language, and you already have automated tests (unit tests, and automatable system tests) which use a standard framework, e.g. JUnit and Ant, then CI is pretty easy to set up. If you're using a less conventional language like Python or Ruby you would probably need to create at least a plugin if not a system yourself. CI is very valuable in a medium to large project, I strongly recommend you get it set up.

              B Offline
              B Offline
              Bernhard Hiller
              wrote on last edited by
              #13

              Thanks for your comments. We are using C#. But automated tests are still o be introduced.

              P B 2 Replies Last reply
              0
              • B Bernhard Hiller

                Thanks for your comments. Also I find the points you mentioned useful. But I'd include some automated tests (actually lots of regression testing required, but who wants to do them...).

                P Offline
                P Offline
                pasztorpisti
                wrote on last edited by
                #14

                As I mentioned the build system basically does nothing but runs commands on different machines. An automated test is just a command to run for the build system that can be displayed separately on the web interface. Don't overcomplicate the build system like I did first time! :-) It just runs your commands, it shouldn't know about your development environment, tests, and so on... If you want something complicated then run a script from your build system (I use python for that). I put a command into the config of our build system if I want to see it in a separate "box"/log file on the web interface, otherwise I just put a set of commands to external script files (if its ok to put their output to the same log file).

                1 Reply Last reply
                0
                • B Bernhard Hiller

                  Thanks for your comments. We are using C#. But automated tests are still o be introduced.

                  P Offline
                  P Offline
                  pasztorpisti
                  wrote on last edited by
                  #15

                  The build system is independent from the development environment you use, also from your language. I rarely see overly customized build systems (for example I saw one that took screenshots about auto-tests of an opengl software and showed it on the web interface) and it rarely worth the efforts.

                  1 Reply Last reply
                  0
                  • B BobJanova

                    If you are using a standard language, and you already have automated tests (unit tests, and automatable system tests) which use a standard framework, e.g. JUnit and Ant, then CI is pretty easy to set up. If you're using a less conventional language like Python or Ruby you would probably need to create at least a plugin if not a system yourself. CI is very valuable in a medium to large project, I strongly recommend you get it set up.

                    P Offline
                    P Offline
                    pasztorpisti
                    wrote on last edited by
                    #16

                    CI can be very valuable for small projects too, for example if you start a project that has to be run on many different architectures (PC, mac, xbox, ipad, etc...) then you probably want a dedicated development environment (lets say PC) and you want your crossplatform code to be tested immediately after submitting it to your source control system (or maybe before submitting). Its very easy to setup CI for a small project if you did setup earlier. For a small project its usually just running a command on a machine or a few machines (one per platform). Plus setting up email etc in the config that is easy.

                    1 Reply Last reply
                    0
                    • B Bernhard Hiller

                      Thanks for your comments. We are using C#. But automated tests are still o be introduced.

                      B Offline
                      B Offline
                      BobJanova
                      wrote on last edited by
                      #17

                      C# is a standard language, so you should have no problem. We used TeamCity (not free) on a .Net project and everything worked smoothly. You need to have automated tests for efficient development anyway, so hopefully you can get that done as part of the same push as introducing CI. Does that mean you don't have unit tests? In 2012 that is not really on :P

                      1 Reply Last reply
                      0
                      • B Bernhard Hiller

                        Continuous Integration with its automated builds and test is often seen as an important process/tool in software development, especially in agile enviroments. In our company, we want to introduce it now. There are some tools available, some of them even freely. And the respective web sites use to claim that they are easy to use. But in a lecture, I heard that setting up CI is not easy at all, a lot of money could be wasted, and it's better to get a consultant for that... What are your experiences with introducing CI? What was easy, what was complicated? And: what came first - (manual) processes or the tool?

                        H Offline
                        H Offline
                        Hesham Amin
                        wrote on last edited by
                        #18

                        Our team used both cruise control[^] and TFS. We also used PowerShell to automate some tasks within the build scripts. There is a great value in implementing build automation and CI in general. Start simple and add more features to your build steps later. Generally, automation is never a waste of time especially when it comes to repetitive tasks like builds. Hesham A. Amin My blog twitter: @HeshamAmin

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups