How can we improve Team Services?

provide a way to version-control build definitions

Currently, there is no way to revert back to an old version of a Build definition once you've made changes to it.

1,047 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Visual Studio ALM TeamVisual Studio ALM Team shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    started  ·  Visual Studio TeamAdminVisual Studio Team (Product Team, Microsoft) responded  · 

    In the new build system coming with TFS 2015 you can see the full history of the changes to your build definition. The feature that is currently missing is the ability to undo or rollback to a previous revision.

    We expect to get the rollback deployed to our service in the next few months.

    Chris Patterson
    Program Manager

    43 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • PascalPascal commented  ·   ·  Flag as inappropriate

        @ChrisPatterson: I don't think rollback to earlier version of a build definition is enough. Use case is that it should be possible to rerun any build at any time. Of course this could be done with manually rollback (as it is already now by manually editing the build definition to its old values), but this approach fails if I need to go back to the newest definition afterwards or need different version of the build definition for different branches (eg, release and develop).

        IMHO the only possible solution to solve this properly is to have the build definition itself under version-control

      • RavneetRavneet commented  ·   ·  Flag as inappropriate

        This is really important from Build Engineer's point of view. Thanks for taking this up.

      • Jeff BoettcherJeff Boettcher commented  ·   ·  Flag as inappropriate

        To close the loop on my comment, I received confirmation by email from a Microsoft representative that this is only in Build vNext build definitions. There is no source control or history for traditional build definitions from the pre-2015 XAML-based build system, and there probably never will be.

      • Jeff BoettcherJeff Boettcher commented  ·   ·  Flag as inappropriate

        To be clear, does TFS 2015 add change history to existing build definitions? Or is change history only available for vNext build definitions?

      • SimonSimon commented  ·   ·  Flag as inappropriate

        I agree with Yan, having it based on a file means that file can be changed easily.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        It's a good start! I can already see history on build defs using the Community TFS Build Manager, but this is a good add. Thanks.

      • Ralf KarleRalf Karle commented  ·   ·  Flag as inappropriate

        Would be great if configuration of the build controllers and build agents would also be under version control (Tags,...)

      • Robert OsborneRobert Osborne commented  ·   ·  Flag as inappropriate

        What does it mean that it is archived? Other things that you say you will work on go to Planned, not Archived. Does archived mean it's just on the backlog for the distant future?

      • Dotan HaritDotan Harit commented  ·   ·  Flag as inappropriate

        And now what? when do you expect to get to it?
        Is there it possible that it will be taken out of the backlog?

      • BlakeBlake commented  ·   ·  Flag as inappropriate

        Imagine a word processor without an undo feature. That is pretty much the state of build management in TFS at the moment.

        That this feature even needs to be voted on troubles me.

      • RomanRoman commented  ·   ·  Flag as inappropriate

        This is the most missing feature in a Continuous Integration environment that is being used by plenty of users...

        We're using a 3rd party product to do the trick....
        Shouldn't be that way...

        Thank you.

      • Kaushik PatelKaushik Patel commented  ·   ·  Flag as inappropriate

        People are keep changing build definition and sometimes it result in build failures. It is very difficult to identify who made changes and what changes made by him/her

      • Atul TrikhaAtul Trikha commented  ·   ·  Flag as inappropriate

        I got into the same issue where someone from the team modified the Build Definition, I tried to find all the available option but found none except ‘Xeam Build Definition Extension’ which is only supported VS 2012 onward and has some downsides, so finally to get the immediate work around I wrote a small app which returns the Last Modified By and Last Modified Date and the complete Build Definition details which you can compare with previous version to find what got changed.Below is the code snippet, hope that helps

        Imports Microsoft.TeamFoundation.Build.Client

        Private Const RootFolder As String = "C:\TFS Utility Reports\"

        ''' <summary>
        ''' To Get the Build Definition Details
        ''' </summary>
        ''' <param name="teamProjectName"></param>
        ''' <param name="buildDefinitionName"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared Function GetBuildDefinitionDetails(teamProjectName As String, buildDefinitionName As String) As String
        Dim buildDefinitionSummary As String = Nothing
        Dim buildDefinitionDetails As String = Nothing
        Dim reportPath As String = RootFolder & "Build Definitions\" & buildDefinitionName
        Dim buildDefinitionDetailsFileName As String = reportPath & "\" & buildDefinitionName & "_" & Date.Now.ToString(CultureInfo.CurrentCulture).Replace("/", String.Empty).Replace(":", String.Empty) & ".txt"
        Dim buildService = CType(TfsTeamProjectCollection.GetService(GetType(IBuildServer)), IBuildServer)
        Dim buildDefinition As IBuildDefinition = buildService.GetBuildDefinition(teamProjectName, buildDefinitionName)
        If buildDefinition IsNot Nothing Then
        GetAllBuildDefinitions(teamProjectName)
        buildDefinitionSummary = buildDefinition.ToString()
        UpdateFile(buildDefinitionSummary, buildDefinitionDetailsFileName, reportPath)
        If buildDefinition.Workspace IsNot Nothing Then
        buildDefinitionDetails = String.Format(CultureInfo.CurrentCulture, "Last Modified By: {0}, Last Modified Date: {1}",
        buildDefinition.Workspace.LastModifiedBy,
        buildDefinition.Workspace.LastModifiedDate)
        End If
        End If
        Return buildDefinitionDetails
        End Function

        ''' <summary>
        ''' Generate Log/Summary/Report
        ''' </summary>
        ''' <param name="lineToWrite"></param>
        ''' <param name="filePath"></param>
        ''' <param name="folderPath"></param>
        ''' <remarks></remarks>
        Private Shared Sub UpdateFile(ByVal lineToWrite As String, ByVal filePath As String, ByVal folderPath As String)
        Dim strFileName As String = String.Empty
        lineToWrite = lineToWrite.Trim()
        strFileName = filePath
        Dim di As IO.DirectoryInfo = New IO.DirectoryInfo(folderPath)
        If Not di.Exists Then
        di.Create()
        End If
        Dim streamWriter As New StreamWriter(strFileName, True, System.Text.Encoding.ASCII)
        Try
        Dim strOutput As String
        strOutput = lineToWrite.ToString
        streamWriter.WriteLine(strOutput)
        Catch ex As Exception
        Throw
        Finally
        streamWriter.Dispose()
        End Try
        End Sub

      • Glen AppletonGlen Appleton commented  ·   ·  Flag as inappropriate

        Please consider this as a high priority item in the next release as it is virtually the only area in TFS for which I cannot audit changes.

      • Reinhard KuhnReinhard Kuhn commented  ·   ·  Flag as inappropriate

        Still considering? Since 2011?
        Do you realize how painfully ironic it is to reside right in the middle of a powerfull versioning system and force the enterprise user, dealing with literally hundreds of build definitions, to maintain this important element in a fire-and-forget fashion flying blind without instruments?

        Seriously? Its not even hard to implement.

      ← Previous 1 3

      Feedback and Knowledge Base