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:
|tfs server url||https://localtfs/tfs/defaultcollection|
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
- Unzip the latest release of team explorer everywhere in your C:\Users\[USER]\Documents folder
- Start a command prompt with administrative rights (run as Administrator)
- Go to the folder of step 1
- Create a new workspace
tf -login:john,secret -server:https://localtfs/tfs/defaultcollection workspace -new greenplum
- 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
- Get the sources
tf get -recursive c:\dashboard
Now comes the “hacking” of a DataGrip project so it can use the TFS plugin.
- In DataGrip open menu File > New > Project – supply the name dashboard
- File > Close Project
- Close DataGrip
- Go to C:\Users\[USER]\AppData\Roaming\JetBrains\DataGrip2020.3\projects\dashboard with the Windows Explorer
- Move the .idea folder to C:\dashboard
- Open DataGrip
- File > Open Project
- In the Open dialog remove the “old” dashboard project as it points to the old location
- Browse to the C:\dashboard and open it as a project
Finally the installation of the plugin.
- In DataGrip open File > Settings
- 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
- Restart DataGrip
- File > Settings
- 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
- Uncheck the Use built-in reactive client if possible
- Visual Studio TF client was already found since we have VS2019 installed
- Click OK
- File > Attach Directory to Project – supply c:\dashboard
- Git > Enable Version Control Integration – choose TFVC
- Click OK
- A dialog prompts for the password to connect to TFS – supply secret
- Click OK
- 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.