Visual Studio Online Hosted Agent Public IP - tfs

I'm attempting to move our internal builds to VSO. The kicker is that we have our own private nuget feeds that the builds will obviously need access to. Now I would rather not have to just open the feeds up to everyone and instead whitelist the ip(s) being used by the VSO hosted build agents.
Has anyone got any ideas as to how I go about getting th ip ranges used by these hosted agents?
Or is there a better way of achieving what I am after?
thanks

VSO Build Agents are hosteded in cloud, so there is no changeless IP range for them.
I would recommend you set a credential for your Nuget Server. And in the build definition, adding a powershell step to call Nuget restore instead of using the "Restore Nuget Packages" option provide by VSO.

Other option also might to be install your own agent service on machine which has access to yours Nuget Repo:
https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-windows

Related

JetBrains Rider - errors when connecting to on-prem TFS

I am trying to connect latest version (2019.3.4) of Rider to TFS (on premise, TFS 2010).
I went through the steps in their community support (https://rider-support.jetbrains.com/hc/en-us/articles/360000335099-How-to-use-Visual-Studio-s-TFV%D0%A1-local-workspace-in-Rider), and got stuck on the step #6.
Go to VCS -> TFVS -> Manage Workspaces, select your server, and press "Reload workspaces"
I am getting the following error when clicking reload:
If I try to click 'Edit' button, I get a different error:
When I try to view file history, I get this warning
13:50 Problems while loading file history: HTTP 401 Unauthorized
Rider never asked me to authenticate with my VCS (and I see no way of doing that).
What should I do to make it work?
Thanks
The documentation you refer to is using Visual Studio's TFVС local workspace, while TFS 2010 only supports Server workspace. Local & server workspace:
https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/decide-between-using-local-server-workspace?view=azure-devops
Azure DevOps plugin supports working with Git and TFVC repositories on Azure DevOps Services or Team Foundation Server (TFS) 2015+, and support Local workspace only.
So, the answer by Cece is helpful, but does not solve the problem.
It simply turned out that I need a different plugin to Rider.
The one installed by default in recent releases is for Azure DevOps.
There is another one, called TFS - and that's the one to use.
https://plugins.jetbrains.com/plugin/4578-tfs/

Issue with visual studio build agent behind a proxy

I am currently setting up continuous integration using Visual Studio Team Services with onsite build agents, but I am having issues with my company's proxy.
I have tried adding the .proxy file but my company's proxy is still blocking it (it is a very old proxy).
Speaking to my infrastructure guys they can bypass the proxy but need all the urls that the build agent calls.
Unfortunately I can not find a list online of all the urls that it requires, I know it needs the following:
https://xxxxxxxxx.visualstudio.com
https://xxxxxxxxx.vssps.visualstudio.com
Does anyone know all the other urls that an onsite build agent calls?
It's hard to tell, the agent itself uses a number of URI's connect, the ones I know of are these at least:
account.visualstudio.com
account.vsrm.visualstudio.com
account.vssps.visualstudio.com
app.vssps.visualstudio.com
But then there are a number of tasks that need download access as well, e.g.
npm needs access to www.npmjs.com
Sonar Qube needs to download the sonar runner
NuGet needs access to www.nuget.org to restore packages
...
Then depending on which extensions you use, you may need additional ones
My Snyk task needs access to snyk.io for example
The easiest way to find them all is to setup a build agent outside of your company network and monitor the traffic with fiddler. To get an answer from the source I recommend to post an issue on the vsts-agent github repo.

Can I host the code on TFS cloud and build locally

I want to use existing TFS build scripts but move my code to the TFS cloud.
Can this be done?
Is it as simple as changing the "Source Control Folder" in the Build Definition? (I doubt it).
We have a local build machine which I want to use as it has custom installations required for the build to succeed.
You can. If you install and configure a TF Build Controller locally you can connect it to VSO. Add some agents and you can build hapily locally with all you code safe and secure in the cloud.

How to automate the download and installation of Sitecore update packages generated from TFS build?

I am developing a Sitecore solution locally using TDS. Our source control and build server is Visual Studio Team Services (in the cloud). I would like to figure out a way to implement Continuous Integration and get builds to be automatically installed on an Integration server that is an Amazon VM (or it could be some other externally located server). I have the TDS build configuration set up to create a Sitecore Update Package. The build process works great. At the end of the build process I have the Sitecore Update Package sitting in a Drops folder in source control (TFS in the cloud). Now I can't figure out how to automate the process of getting that update package out of source control and downloading it to the Integration server and running the Sitecore command to install it.
In a perfect world you would use something along the lines of a fancy Microsoft Release Management to deploy it to the environment of choice. However, if you are like the majority of us mere mortals without the fancy tools - this should help: https://github.com/adoprog/Sitecore-Deployment-Helpers
With these pages you could just send a get request from TFS or use the logic to write a custom PowerShell post-build script. Hope this helps!
As you are using TFS you get to use Release Management for Visual Studio out of the box. This is a simple install but at this time is separate. I have an instance of RM running in a VM and attached to my VSO instance for running deployments.
I would expect this tool, which was bought by MS last year, would become more integrated in vNext.

Is it possible to install the Team Foundation Build Services on another machine or VM?

I'm working on automating our build process using Team Foundation Build 2010. When our TFS Server was installed, whomever installed it didn't install the Build Configuration Services so this node is missing from the TFS Admin Console. I'm pretty sure I know the answer to this but I wanted to check in case I'm missing something. I'm also asking because the TFS Server is a production server and my supervisors do not want to install anything on this server. Can the Build Services be installed on another machine or VM and still have the Build Configuration Node appear in the TFS Admin Console? I know the Build Controller as well as the Build Agent can be installed on another machine or VM. I just wanted to get clarification on the "Build Configuration Services" piece. Thank you
Absolutely! This is actually a very typical scenario. I don't normally recommend for people to install the build services on any of the application tier servers. When you install only the build features, the TFS Administration Console will show only the build features.
By installing it on separate machines, you can create a build farm of a build controller with multiple build agents. It scales very well.
Build servers would be considered "production" servers in my opinion as well. They don't have the same disaster recovery or monitoring requirements though. If a build machine dies, just image another one and add it to the pool. This is essentially how the elastic build service for the Team Foundation Service (aka TFS Preview) currently works. They get destroyed after each use.

Resources