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

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

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: tfs-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      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?

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              redsolo redsolo
              Reporter:
              antonzimin Anton Zimin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: