DataGrip TFS plugin setup

We use DataGrip for developing postgres on Greenplum. To get our sources into TFS we’re using the Azure DevOps plugin (https://plugins.jetbrains.com/plugin/7981-azure-devops). Since the documentation is very little and the requests for help are many, we share our setup.

We assume you’ve already got DataGrip installed. In the commands we use the following:

ParameterValue
usernamejohn
passwordsecret
workspacegreenplum
tfs projectdashboard
tfs server urlhttps://localtfs/tfs/defaultcollection
parameter values for commands

Team Explorer Everywhere

The plugin relies on the team explorer everywhere software from https://github.com/Microsoft/team-explorer-everywhere/releases. This requires a java runtime to be installed. That is already installed with DataGrip (so first install that)

We edited the tf.cmd file to use less memory for java. Maybe you’ll need to do the same. Details on github: https://github.com/microsoft/azure-devops-intellij/issues/45#issuecomment-268790878

  1. Unzip the latest release of team explorer everywhere in your C:\Users\[USER]\Documents folder
  2. Start a command prompt with administrative rights (run as Administrator)
  3. Go to the folder of step 1
  4. Create a new workspace
    tf -login:john,secret -server:https://localtfs/tfs/defaultcollection workspace -new greenplum
  5. Map a local folder with a tfs project in the workspace (make sure to create the local folder)
    tf workfold -map -workspace:greenplum $/dashboard c:\dashboard
  6. Get the sources
    tf get -recursive c:\dashboard

DataGrip project

Now comes the “hacking” of a DataGrip project so it can use the TFS plugin.

  1. In DataGrip open menu File > New > Project – supply the name dashboard
  2. File > Close Project
  3. Close DataGrip
  4. Go to C:\Users\[USER]\AppData\Roaming\JetBrains\DataGrip2020.3\projects\dashboard with the Windows Explorer
  5. Move the .idea folder to C:\dashboard
  6. Open DataGrip
  7. File > Open Project
  8. In the Open dialog remove the “old” dashboard project as it points to the old location
  9. Browse to the C:\dashboard and open it as a project

TFVC plugin

Finally the installation of the plugin.

  1. In DataGrip open File > Settings
  2. Click the Plugins section, click the wheel > Install plugin from disk and supply the path to the zip file downloaded from https://plugins.jetbrains.com/plugin/7981-azure-devops
datagrip settings to install plugin
  1. Restart DataGrip
  2. File > Settings
  3. Open the Version Control section and click TFVC > supply the location of tf.cmd in your C:\Users\[USER]\Documents\TEE-CLC-14.135.0 folder
  4. Uncheck the Use built-in reactive client if possible
  5. Visual Studio TF client was already found since we have VS2019 installed
  6. Click OK
  7. File > Attach Directory to Project – supply c:\dashboard
  8. Git > Enable Version Control Integration – choose TFVC
  9. Click OK
  10. A dialog prompts for the password to connect to TFS – supply secret
  11. Click OK
  12. Now DataGrip shows the folder structure on the right and options to use TFVC like Checkout and Update (= get latest).

These are the steps we used to get it working. Hope you’re able to achieve great things with this knowledge.

About erictummers

Working in a DevOps team is the best thing that happened to me. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Development, Tooling and tagged , , , . Bookmark the permalink.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.