View Types

We have automated scripts which build our application. This is a good thing. The build process gets the latest version of code from our source code repository. The post explores the decisions made on how we identify and get the latest version of source code to build.

Let me first describe our current implementation. We label all files that are the latest version. Then we create a config spec that gets all files with this label. We finally use a dynamic Clearcase view to access a view with this config spec. The code from this view is copied to the local file system where the code is compiled

Recently we had to modify our build scripts to use the new tools we have upgraded to. A developer then questioned why we used the current technique to label and access the latest code. Another idea would be to only label those new elements. Then you could get the latest code by getting the code with the latest label, or the last label, and so on. The advantage of this is you consume less Clearcase resources by eliminating a new label on every file for every build.

Another variation on the build is to use a snapshot view. This view can be anchored on the local file system. Then you only need to refresh your view to get the latest code on your local drive in one operation. According to our configuration management experts, this activity will take a lot longer than using a dynamic view and copying the contents of the view to the local disk drive.

In discussions like this, I like to focus on the requirements to help determine the best solution. Our business goals for our builds are to obtain the latest version of the code, and to be able to easily retrieve the full version of source code used to perform any past build. Creating a label on all files for each build makes this last requirement easy. There are many paths to be able to get the latest code. I don’t think any way is better than another to get the latest version of the code.

After a discussion between development and CM, we decided to leave things the way they were. The developers who worked on porting the build scripts to the new tools had some troubles getting the views set up and working with the old technique. We might be making some strategic changes in our build scripts. I will keep you posted.