Is it possible to change the content of a snapshot created by a build result during the build?
![]()
Canberk Akduygu (992●3●73●71)
| asked Sep 17 '12, 4:10 p.m.
retagged Jun 09 '13, 11:44 a.m. by Morten Madsen (305●30●48) Hi, I have a customer who is trying to change the content of snapshot created by a Build result. The use case is that we have N component in the stream and we create some jar,war and ear packages with those components. But only 3 of those components will contain a package(ear,war,etc...). So we like to take a snapshot of those 3 components at the end the build and attach it to the actual Build Result. So whenever somebody open the build result, he/she will see only the components that have a dowloadable package. Or which way would it be better to implement such a case? We thought about removing the uncessary components from BuildUser's workspace by using scm command in build.xml so the snapshot will only contain our desired component but didnt work. Is it possible to do this kind of operations or not? I believe RTC wouldn't allow us to manipulate that snapshot. |
2 answers
![]() As Nick commented:
We wrote an Ant task that allows one to associate a snapshot to a build result. The task works, but once we started using the task we started experiencing this temporarily missing snapshot problem. EDIT: The issue has been resolved and the code below was updated to correct the issue. In certain cases, we associate the same snapshot to more than one build result (e.g. rebuild scenarios). The first time we associate the snapshot to the build result, all works fine. But, subsequent attempts sometimes fail where the server tells us that the item is no longer available. After some time, later attempts for the same item will work. Perhaps our Ant task is putting the snapshot into a temporary bad state? The body of the Ant task is:
The body of the Ant task uses these two methods:
|