Formular una preguntaFormular una pregunta
 

RespondidaBuild Retention Policy and Deleted Version Labels

  • jueves, 25 de septiembre de 2008 15:31HATLANTA Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

     

    Thanks in advance, everyone.

     

    I have the retention policy in my builds to only keep the last two good builds, and that's fine.  However, when I used the Label Sidekick to view a baseline (version label) from many builds ago, that's when I realized that all my prior build labels are no longer on the code, and only the last two build labels still exist.

     

    How can I set up TFS so that I keep my build retention policy to only keep the last two good builds, and leave all the build version labels that are applied?

     

    I suppose I could add a target to the build script that'll assign a new label to the current build label, and that may work. But more importantly, I'd like to understand the connection between build version labels and the retention policy.

     

    Thanks.

Respuestas

  • martes, 30 de septiembre de 2008 12:47Jason Prickett - MSFTMSFTMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida

    Bill is right. That is our default behavior. However, in SP1 we added the ability to keep your labels. Here is how:

     

    The build admin can add a flag to the Web.config file on the Application Tier to specify that labels should not be deleted. Here is an example of what that line in the web.config file would look like:
    <add key="PreserveLabelsOnBuildDeletion" value="True"/>

     

    You may need to restart IIS to force the use of the new Web.config.


    When this value is present, labels are not deleted from Source Control. The default behavior is still the same as RTM; labels get deleted with their corresponding builds.

     

    Hope that helps,

    Jason

     

Todas las respuestas

  • lunes, 29 de septiembre de 2008 2:58Bill.WangMSFT, ModeradorMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    Hi

    Build retention policy works by deleting old builds. When a build is deleted, the associated label is deleted too.

     

    When retention policy is set, we generally use changeset to track the source code. One of the best practice is adding changeset as part of the assembly version number. When a issue is reported against a particular version, you can extract the changeset number and track back to source code.

     

    For how to set changeset as part of assembly version, see this blog.

  • martes, 30 de septiembre de 2008 12:47Jason Prickett - MSFTMSFTMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida

    Bill is right. That is our default behavior. However, in SP1 we added the ability to keep your labels. Here is how:

     

    The build admin can add a flag to the Web.config file on the Application Tier to specify that labels should not be deleted. Here is an example of what that line in the web.config file would look like:
    <add key="PreserveLabelsOnBuildDeletion" value="True"/>

     

    You may need to restart IIS to force the use of the new Web.config.


    When this value is present, labels are not deleted from Source Control. The default behavior is still the same as RTM; labels get deleted with their corresponding builds.

     

    Hope that helps,

    Jason