Hi!
I'm thinking about the best way to structure jobs in Hudson, and what to divide into jobs. I'll use a .NET application as an example as that is what I am working on now, but I think a lot of the ideas are generic.
These are the steps which I want to perform, without thinking about dividing things into jobs but still thinking about what the dependencies are: ( I hope you understand my notation, <- means depends on and [X] = aaaaa means that aaaaa is a description of task [X]. )
- [C] = Check out the project, using Mercurial in this case.
- [C] <- [S] = Run StyleCop on the source files to make sure they comply with our coding standard.
- [C] <- [D] = Create documentation from our project using DoxyGen or Sandcastle.
- [C] <- [O] = Run the code tasks plugin to get a nice presentation of our TODO etc comments.
- [C] <- [B] = Build the solution using MSBuild with the Release target. The result in this case will be library files compiled to DLL assembly files. We would like to archive these artifacts.
- [B] <- [T] = Run NUnit tests on the library files.
- [B] <- [F] = Use FxCop to get some nice static code analysis from the library files.
- [B] <- [W] = Use the compiler warnings plugin on the build log to extract all warnings given during the compilation.
- [D], [B] <- [R] = Release, create a release archive and upload it to a server.
If I split all of these up into different jobs:
- How should I get the checked out source code which I got in step [C] in step [S], [D], [O], [B] which all need the source code?
- How should I get the MSBuild log file in step [W] which was generated in step [B]?
- How do I get the resulting DLL artifacts generated in step [B] in step step [T] and [F] who both needs them?
My main problem if I split all the steps up into different projects is how to get these things, these files, between the different projects in a nice manner (I could of course turn to hard coding file paths, but that seems inflexible, but I might be wrong).
On the other hand, if I do split them into different projects I get less complexity for each project than I would if I crammed all these steps into a single project. It might be hard to maintain if I have that many things in one project. And I would also not be able to run disjunct projects in parallel which I guess would speed up the whole process.