Pull code from repository on VM startup?
Hello Everyone,
I tried doing some searching, but wasn't able to find help related to what we're trying to do with a new VM setup.
We are currently being upgraded to new windows 10 vm's with the plan that we will have one master that all of our test runner machines will be created from on start/restart. Once the vm's are created, they will just have the software installed we need to run our tests through TestExecute. When a vm is restarted, it will then be re-built each time from the master to try and keep the machine as clean as possible.
The part we're trying to figure out is how we can on vm startup pull code from our TFS repository so the VM has the latest version of code to run tests/processes we use it for. This restart would most likely happen over the weekend and we have processes that run daily early in the morning (2 AM) that would need this code to be able to run when no one is there to push code to the vm. In our current setup, we are able to copy code manually down to our VM's that are not rebuilt upon a restart and thus keep the code necessary to run day to day.
Any suggestions on how to approach this are appreciated, thanks.
We're using a commandline call in Task Scheduler. We have ours triggered on a timer but you can trigger off of logon or startup.
"C:\Program Files (x86)\Microsoft Visual Studio\2017\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe" get *.* /force /recursive