It's all about the answers!

Ask a question

Snapshot when build fails

Jayson Dai (333) | asked Feb 15 '13, 10:43 a.m.
I use the following settings in the Build definition : 
- Delete directory before loading : UNCHECKED 
- Accept latest changes ... CHECKED 
- Build only if there are changes .. CHECKED 
The build is automatically scheduled on a regular basis. 

I noticed that a snapshot is created/delivered each time when the build starts, even when the build fails. Here are my questions:
 - Why do I need the snapshot if the build fails?
  - What should I do if I don't want a snapshot when the build fails? 


Accepted answer

permanent link
Tim Mok (6.6k38) | answered Feb 15 '13, 11:04 a.m.
Snapshots cannot be delivered. It's an immutable configuration of a stream or workspace. It represents what went into your build. I think the snapshot is taken before the build activities run so it's not known the build will fail.

You can delete the snapshot and it'll be in the build user's build workspace. If you're worried about scalability, snapshots are lightweight. It's just a descriptor of components and their baselines. Nothing is duplicated when creating a snapshot.
Jayson Dai selected this answer as the correct answer

Spencer Murata commented Feb 15 '13, 11:13 a.m.

To expand on that thought a little.  The snapshot represents the SCM workspace at the time of the build.  If changes were accepted they would be included in this build, whether it passed or not, and the snapshot is used by build to report when the changesets were included into the build.  So deleting the snapshot would be inadvisable as it would confuse the build process in determining when changesets were actually introduced to the build. 


Jayson Dai commented Feb 15 '13, 11:17 a.m.

 Thanks a lot, Tim and Spencer. 

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.