Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60549

TFS plugin fails to detect history if multiple SCM steps are used in pipeline

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • tfs-plugin
    • None

      I have a pipeline with multiple SCM TFS checkouts:

      stage ('SCM') {
          steps {
              script {
                  dir ('Dir1') {
                      checkout([$class: 'TeamFoundationServerScm', credentialsConfigurer: [$class: 'AutomaticCredentialsConfigurer'], projectPath: '$/Repo1', serverUrl: 'http://example.com:8080/tfs', useOverwrite: true, useUpdate: false, workspaceName: 'Hudson-${JOB_NAME}-${NODE_NAME}-REPO1'])
                  }
      
                  dir ('Dir2') {
                      checkout([$class: 'TeamFoundationServerScm', credentialsConfigurer: [$class: 'AutomaticCredentialsConfigurer'], projectPath: '$/Repo2', serverUrl: 'http://example.com:8080/tfs', useOverwrite: true, useUpdate: false, workspaceName: 'Hudson-${JOB_NAME}-${NODE_NAME}-REPO2'])
                  }
              }
          }
      }
      

      AFAIU Jenkins can't detect changes since the last correctly because of the plugin limitations.

      recordWorkspaceChangesetVersion method adds TFSRevisionState action. Probably there will be 2 actions for every build.
      https://github.com/jenkinsci/tfs-plugin/blob/de8c46ab72f750019ffc14b5f3d43f12dc478093/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java#L384

      However, determineVersionSpecFromBuild gets the first action.

      https://github.com/jenkinsci/tfs-plugin/blob/de8c46ab72f750019ffc14b5f3d43f12dc478093/tfs/src/main/java/hudson/plugins/tfs/TeamFoundationServerScm.java#L367


      Is there something I can do to fix the changelogs history?

            Unassigned Unassigned
            antonzimin Anton Zimin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: