I suggest you ...

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.

987 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 →

    38 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...
      • 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.

      • RavneetRavneet commented  ·   ·  Flag as inappropriate

        till data, we have no alternative/method or mechanism to track changes done in build definitions. I strongly agree with Mike G.

      • Mike GMike G commented  ·   ·  Flag as inappropriate

        Please Microsoft, at least provide an audit trail of the changes that happen in build definitions. It's too easy for someone to break a build definition without anyone else knowing that they made a change. Sure the XAML is tracked in source control, but that’s only half the story of a build.

        Seven people in my company have access to build settings/authoring. If one of them takes a peek inside some build definitions, and accidentally makes a change, and accidentally hits save, it won’t be until a build breaks that anyone notices. And then we are left with the mess of trying to find out what the settings were that got changed.

        If we had a log of who/when/which build definition was changed - that would be a simple start. Then if we could see before and after changes, that would be valuable too.

      ← Previous 1

      Feedback and Knowledge Base