EzDevInfo.com

continuous-integration interview questions

Top continuous-integration frequently asked interview questions

Skip a submodule during a maven build

We have a need to be able to skip a submodule in certain environments.

The module in question contains integration tests and takes half an hour to run. So we want to include it when building on the CI server, but when developers build locally (and tests get run), we want to skip that module.

Is there a way to do this with a profile setting? I've done some googling and looked at the other questions/answers here and haven't found a good solution.

I suppose one option is to remove that submodule from the parent pom.xml entirely, and just add another project on our CI server to just build that module.

Suggestions?


Source: (StackOverflow)

How to choose between Hudson and Jenkins? [closed]

It took me an hour or so to work out Hudson has only branched recently (Jan/2011)
I have no idea how rapid the change of each branch is now, but more importantly, what is the direction each branch is taking and what are key points so one could make a choice between which to go with?

Anybody have links to product roadmap and feature differences?


Source: (StackOverflow)

Advertisements

Setting up a deployment / build / CI cycle for PHP projects

I am a lone developer most of my time, working on a number of big, mainly PHP-based projects. I want to professionalize and automate how changes to the code base are handled, and create a Continuous Integration process that makes the transition to work in a team possible without having to make fundamental changes.

What I am doing right now is, I have a local test environment for every project; I use SVN for each project; changes are tested locally, and then transferred to the on-line version, usually via FTP. API documentation is generated manually from the source code; Unit tests are something I am getting into slowly, and it's not yet part of my daily routine.

The "build cycle" I am envisioning would do the following:

  • A changeset gets checked into SVN after having been tested locally.

  • I start the build process. The SVN HEAD revision gets checked out, modified if necessary, and made ready for upload.

  • API Documentation gets generated automatically - if I haven't set it up in detail yet, using a default template, scanning the whole code base.

  • The new revision is deployed to the remote location via FTP (Including some directory renaming, chmodding, importing databases, and the likes.) This is something I already like phing for very much, but I'm open for alternatives of course.

  • Unit tests residing in a predefined location are run. I am informed about their failure or success using E-Mail, RSS or (preferably) HTML output that I can grab and put into a web page.

  • (optionally) a end-user "changelog" text file in a pre-defined location gets updated with a pre-defined part of the commit message ("It is now possible to filter for both "foo" and "bar" at the same time). This message is not necessarily identical with the SVN commit message, which probably contains much more internal information.

  • Stuff like code metrics, code style checking and so on are not my primary focus right now, but on the long run, they certainly will. Solutions that bring this out-of-the-box are very kindly looked upon.

I am looking for

  • Feedback and experiences from people who are or were in a similar situation, and have successfully implemented a solution for this

  • Especially, good step-by-step tutorials and walkthroughs on how to set this up

  • Solutions that provide as much automation as possible, for example by creating a skeleton API, test cases and so on for each new project.

and also

  • Product recommendations. What I know so far is phing/ant for building, and phpUnderControl or Hudson for the reporting part. I like them all as far as I can see, but I have of course no detailed experience with them.

I am swamped with work, so I have a strong inclination towards simple solutions. On the other hand, if a feature is missing, I'll cry about it being too limited. :) Point-and-click solutions are welcome, too. I am also to commercial product recommendations that can work with PHP projects.

My setup

I am working on Windows locally (7, to be exact) and most client projects are run on a LAMP stack, often on shared hosting (= no remote SSH). I am looking for solutions that I can run in my own environment. I am ready to set up a Linux VM for this, no problem. Hosted solutions are interesting for me only if they provide all of the aspects described, or are flexible enough to interact with the other parts of the process.

Bounty I am accepting the answer that I feel will give me the most mileage. There is a lot of excellent input here, I wish I could accept more than one answer. Thanks everyone!


Source: (StackOverflow)

What is the difference between Hudson and CruiseControl for Java projects?

I think the title sums it up. I just want to know why one or the other is better for continous integration builds of Java projects from Svn.


Source: (StackOverflow)

mvn clean install vs. deploy vs. release

I am just learning maven, and we have recently needed to go more and more. I would like to know the difference between

mvn clean install

mvn release

mvn deploy

Please be as descriptive as possible.


Source: (StackOverflow)

Running multiple TeamCity Agents on the same computer?

We have several build machines, each running a single TeamCity build agent. Each machine is very strong, and we'd like to run several build agents on the same machine.

Is this possible, without using virtualization? Are there quality alternatives to TeamCity that support this?


Source: (StackOverflow)

Running JavaScript unit tests headlessly in a Continuous Integration build

I have a webapp build plan running on a Continuous Integration system (Atlassian Bamboo 2.5). I need to incorporate QUnit-based JavaScript unit tests into the build plan so that on each build, the Javascript tests would be run and Bamboo would interpret the test results.

Preferably I would like to be able to make the build process "standalone" so that no connections to external servers would be required. Good ideas on how to accomplish this? The CI system running the build process is on an Ubuntu Linux server.


Source: (StackOverflow)

How do programmers work together on a project?

I've always programmed alone, I'm still a student so I never programmed with anyone else, I haven't even used a version control system before.

I'm working on a project now that requires knowledge of how programmers work together on a piece of software in a company.

How is the software compiled? Is it from the version control system? Is it by individual programmers? Is it periodic? Is it when someone decides to build or something? Are there any tests that are done to make sure it "works"?

Anything will do.


Source: (StackOverflow)

How do you run NUnit tests from Jenkins?

I'm looking to run automated NUnit tests for a C# application, nightly and on each commit to svn.

Is this something that Jenkins-CI can do?
Is there an online tutorial or how-to document which documents a similar setup that I can look at?


Source: (StackOverflow)

Comparison of CI Servers? [closed]

I am searching for a comparison of different continuous integration (CI) Servers (esp. focusing on .NET) and couldn't find any.

Therefore I'd like to know what you think about the different solutions available, what are the pros and cons, what are the hosting requirements and why CI Server XY is the Server of your choice.

I am interested in your thoughts on (feel free to comment on others to):

Points of Interest are:

  • Configuration (easy, flexible)
  • Integration with SCM (esp. DSVC like git or hg)
  • Integration with build sytems (MSBuild, NAnt, Rake)
  • Integration with Testing Frameworks
  • Integration with Source Anaylsis (Simian, NDepend, FxCop, NCover etc.)
  • WebInterface/Dashboards
  • Infrastructure requirements

Source: (StackOverflow)

How to select different app.config for several build configurations

I have a dll-type project that contains MSTest integration tests. On my machine the tests pass, and I want the same to happen on a CI server (I use TeamCity). But the tests fail, because I need to tweak some settings in app.config. This is why I was thinking to have a separate second app.config file that will hold the settings for CI server.

So I would like to have

/Sln
 /Proj
  app.config (I think this is required by VS)
  app.Release.config (This is a standalone independent config file)

Thus if I select Release configuration in build config on CI, I would like to use app.Release.config file instead of app.config

Problem
This doesn't seem to be straightforward for simple .dll type projects. For web projects, I can do web config transformations. I found a hack how to do these transformations for a dll type project, but I am not a big fan of hacks.

Question
What is a standard approach to tweak app.config files depending on build config for .NET projects (such as Debug, Release, ...)?


Source: (StackOverflow)

buildbot vs hudson/jenkins for C++ continuous integration

I'm currently using jenkins/hudson for continuous integration a large mostly C++ project. We have separate projects for trunk and every branch. Also, there are some related projects for the Java code, but the setup for those are fairly basic right now (we may do more later though). The C++ projects do the following:

  • Builds everything with options for whether to reconfigure, do a clean build, or use a fresh checkout
  • Optionally builds and runs all tests
  • Optionally runs all tests using Valgrind's memcheck
  • Runs cppcheck
  • Generates doxygen documentation
  • Publishes reports: unit tests, valgrind, cppcheck, compiler warnings, SLOC, open tasks, and code coverage (using gcov, gcovr, and the cobertura plugin)
  • Deploys code nightly or on demand to a test environment and a package repository

Everything is configurable for automatic builds and optional for on demand builds. Underneath, there's a bash script that controls much of this, which farther depends on our build system, which uses automake and autoconf along with custom bash scripts.

We started using Hudson (at the time) because that's what the Java guys were using and we just wanted nightly builds. Since then, we've added a lot more and continue to add more. In some ways Hudson is great, but certainly isn't ideal.

I've looked at other solutions and the only one that looks like it could be a replacement is buildbot. Would buildbot be better for this situation? Is the investment worth it since we're already using Hudson? Why?

EDIT: Someone asked why I haven't found Hudson/Jenkins to be ideal. The short answer is that everything can be improved. I'm simply wondering if Jenkins is the best current solution for my use case or whether there is something better (buildbot?) that would be easier to maintain in the long run even as new requirements come up.


Source: (StackOverflow)

Continuous Integration for a small .NET open source project [closed]

I'm starting a small open source project, myself being the sole contributor for the time. Still, I think a continuous integration setup would be useful to detect whether I broke the build.

Is there a free, hosted continuous integration server that is suitable for very small projects? Googling turned up CodeBetter, but I'm not sure they'll accept a one-man project that is just starting up.

I prefer TeamCity, but I'm open to suggestions.

Note - a hosted solution is a must for me. I don't want to setup and maintain a continuous integration server, so answers like "TeamCity" or "CruiseControl" are simply irrelevant.

Specific requirements:

  • I am hosting my project at GitHub, so the continuous integration server needs Git integration
  • I would like the continuous integration server to run .NET integration (unit) tests
  • Nice to have - I also need access to a MySQL server (although I could modify the tests to use embedded SQLite, they currently run against an external MySQL server).

Source: (StackOverflow)

How to combine Vagrant with Jenkins for the perfect Continuous Integration Environment?

You have a project which has got some SW requirements to run (e.g.: a specific version of Apache, a version of PHP, an instance of a MySQL database and a couple of other pieces of software).

You have already discovered Vagrant, so your virtual environment is all setup. You can create boxes out of your configuration files and cookbooks.

You have also understood the advantages of a Continuous Integration system such as Jenkins.

Now you would like to combine these two worlds (Vagrant and Jenkins) to get the perfect Continuous Integration Environment. To be more specific, you would like not to install the SW required by your project on the machine running Jenkins, but you would like to use the virtual environment provided by Vagrant to periodically build your project on the top of it. The CI software (Jenkins) will build the Vagrant box for you and build and test your project on the top of it.

How would you setup your environment to achieve this?


Source: (StackOverflow)

Continuous Integration Servers [closed]

My company is considering changing continuous integration servers (I won't say which one we have now, so I won't skew your responses in anyway :) ) I wondering if anybody has any recommendations? Best user experience, level of difficulty to maintain, etc...

Our code is all in java, and we use ANT as a build tool.


Source: (StackOverflow)