DvirH
DvirH

Reputation: 80

Handling Git repository updates from a tfs server

My team is developing a web application to help automate testing (flask python backend).

When a test is needed an enginner writes some code "test_code1" which can be a python, matlab or just some sql code. The code is commited to a git repository which is hosted on a tfs server, that way it is easy to link commits to tfs items.

Our application, however, is hosted on another server and we are working on a clone of this tfs repository(only one branch is considered, no need to switch).

This creates some exrta work for a test developer. He commited his test code (to the tfs server) and wants to define his test. He goes to the test definition window but his file is still not there because in order for the file to be on the server he needs to log into the server and run a git pull command.

I wanted the file to be avaliable to the tests developers on the server without them needing to do any other tasks.

I thought of some ways and would like to know if my solution holds out (are there some idioms, dos and not dos in my case?):

  1. Run a git pull command whenever someone is opening the test definition window or run test window. Because the test defintion window is the only way for developers to define a test in the system, and the only way to run it is through the run test window this sounds legit. Increments in repository volumn are expected to be quite small so pull time should be short.

  2. No clone. Copy the test code from the tfs repository whenever a test is needed. A typical test file is not expected to go over 100kb but we will be expected to run thousends of tests so it might considerably slow down our system.

  3. Run a git pull command every couple of seconds. A simple process to run this system command. Should be quite easy.

Upvotes: 1

Views: 46

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51073

Technologically speaking, you just need to force a sync between your local git repo and TFS server remote repo.

Usually we do this manually, you want auto this process.

I would go for solution 1, and is most logical, given the technologies available.

As a workaround, should choose solution 3.

Upvotes: 1

Related Questions