Wednesday, August 31, 2011

Setting up the first SVN build

For almost first two years of my RE career I was working on builds running on CVS and shell scripts. Now was the time and opportunity to move to relatively new technology and SCM. I was owed with a responsibility of setting up build environment for continuous build, using SVN and maven as the tools.

This was a responsibilty I was eagerly awaiting as till this time I had never done a end to end setup of build environment. I grabbed the opportunity with both the hands.

As it looked in the beginning, my primary task was to
  • create the branch.
  • Prepare the trunk for SNAPSHOT build
  • from the trunk, create a branch for the sustaining to chack-in 
I will detail each of the above one-by-one.

Creating the branch.
I was given a tag from which I had to create the branch which can be used to checking in the  fix for sustaining team. This was the my first stint with the SVN and handling the branch.

Following are the sequence of steps I executed to create the branch.
To check-out the x.y tag and export it to the internal svn repo, I used "svn export"
1. svn mkdir http://aaa.bbb.ccc.ddd/svn/product/sustaining/trunk/<sustainng dir>
2. svn checkout http://aaa.bbb.ccc.ddd/svn/product/sustaining/trunk/<sustainng dir>
3. cd <sustaining_dir>
4. svn export https://svn.net/svn/<pde-product>/tags/<pde-product> .
5. svn add .
6. svn commit .

It looked so simple but it took almost a day's time to get going with the branch not because of  the time involved in commiting the files rather because of my inexperience with the branch creation using SVN.The main issue I faced during the branch creation was the error message I use to get when I tried to commit, a message saying " the directory is always part of the svn repo".  I tried all the tricks to get the files commited into the repo, but with no positive outcome. Finally introduction of argument "-f" (forced) got the job done for me.
Prepare the trunk for SNAPSHOT build



No comments:

Post a Comment