Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to TFS SDK and use it for obtaining detailed changeset info #17

Merged
merged 15 commits into from
Oct 23, 2013

Conversation

olivierdagenais
Copy link
Member

Project.getDetailedHistory() no longer launches the tf CLC but instead uses the TFS SDK for Java to communicate with the TFS webservices directly. This gives us richer information (such as e-mail addresses) with less string parsing.

Manual testing:

  1. Create a job that uses the TFS SCM and run it.
  2. Wait until lots of users make check-ins, especially users where their domain username doesn't directly map to their e-mail address (i.e. EXAMPLE\ljenkins does not imply their e-mail address is ljenkins@example.com since it could be leeroy.jenkins@example.com).
  3. Run the job again.
  4. Inspect the run's "changes" and notice that full names are displayed, and clicking through them will [eventually] show their e-mail addresses. The latter can also be confirmed by browsing Jenkins' users/ sub-folder and noticing all the committers now have Jenkins users with their full name and e-mail address as configured in TFS.

Mission accomplished!

Downloaded version 11.0.0.1306 (published 2013/06/21) from http://www.microsoft.com/en-us/download/details.aspx?id=22616
Needed to repeat parent dependencies due to the TFS SDK including its dependencies inside its JAR instead of being and using Maven artifacts.
This will allow users to be resolved earlier.
This should give us access to JenkinsRule.
This avoids having to add the com.microsoft.tfs.jni.native.base-directory property in the container's configuration file.
Added an integration test to verify the functionality.
TFS should only be queried for a user's e-mail address the first time; the change will be persisted in Jenkins for subsequent times.
@cloudbees-pull-request-builder

plugins » tfs-plugin #12 SUCCESS
This pull request looks good

olivierdagenais added a commit that referenced this pull request Oct 23, 2013
Switch to TFS SDK and use it for obtaining detailed changeset info
@olivierdagenais olivierdagenais merged commit 9996e24 into master Oct 23, 2013
@olivierdagenais olivierdagenais deleted the useTfsSdk branch October 23, 2013 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants