I need to regularly download a complete set of latest code for a particular project from a VSTS account (server workspace), to a folder on a file server for readonly archiving.
Currently I log on to the web portal and click Download as ZIP for the selected project and save this to the file server.
But I'd like a more automated way, preferably something I can schedule to run from the file server itself which won't have Visual Studio installed or cached credentials for the online account.
Any of the following soluions would be ok:
Nice to have:
You could use our tools in Visual Studio, Eclipse, or from the command line to keep a local copy of your source code on your machine.
More details please refer official tutorial: Download (get) files from the Server
Also, if you want to download your code as a zip:
You can click on any ellipsis to find the menu which contains Download as Zip
option.
If you want a automated way, suggest you use the build pipeline. You could disable the default get source steps in the build definition. And use your own powershell script to do the get source/pull files to the workspace. How to, please follow: Is it able to ignore/disable the first step Get source in vNext Build?
This will download files in your build agent, if it's not the machine you are working on. You could combine Archive Files & Windows Machine File Copy task and select Scheduled trigger in your build definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With