Why?

Who needs this if there is already a TFS plugin for Jenkins and the feature has been completed? I couldn’t find a graphical guide on how to do it. There are a lot of configuration pages in Jenkins. I assume you have Jenkins and TFS playing together for this guide. You can follow the steps below to have Jenkins create a label in TFS.

How?

1. Open Jenkins

jenkins_home_2017-02-28_16-38-22
2. Open your project

jenkins_ryans_test_project_2017-02-28_16-40-15
3. Click “Configure”

4. Click “Post-build Actions”

jenkins_configure_project_2017-02-28_16-41-16

5. Click “Add post-build action”
6. Select “Create a label in TFVC” (TFVC = Team Foundation System Version Control)

jenkins_post_build_action_2017-02-28_16-43-22
7. Set the label as you see fit

jenkins_create_a_label_in_tfvc_2017-02-28_16-44-29
8. Click “Always” or “If the build is successful” depending upon when a label should be created

9. Click “Save”

10. Go back to your project

jenkins_ryans_test_project_2017-02-28_16-40-15

11. Click “Build Now”

12. Open your Build

13. Click “Console Output”

jenkins_console_output_2017-02-28_16-45-49

14. Go to TFS to see the newly created label

jenkins_label_in_tfs_2017-02-28_16-47-48

That’s it. Now you can trace your Jenkins builds back to a specific version in your TFS source control.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s