Fazer uma PerguntaFazer uma Pergunta
 

RespondidoBuild Retention Policy and Deleted Version Labels

  • quinta-feira, 25 de setembro de 2008 15:31HATLANTA Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

     

    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.

Respostas

  • terça-feira, 30 de setembro de 2008 12:47Jason Prickett - MSFTMSFTMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    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 as Respostas

  • segunda-feira, 29 de setembro de 2008 2:58Bill.WangMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    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.

  • terça-feira, 30 de setembro de 2008 12:47Jason Prickett - MSFTMSFTMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    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