Test Azure Devops Services Organization - tfs

We are migrating from Azure Devops Server on prem to Azure Devops Services. On prem we had two servers, the first for production and the second - the same - for test purposes. Since we had access to db, we were able to update test server whenever we want to production data using backup.
The question is: is it possible to manage somehow the same on Azure Devops Services? We want to have test organization that we will be able to update with new prod data later.

In the azure devops Service, We can create up to 5 different organizations. So you can try to migrate your test organization to the Azure Devops Service, and this will help you have the test organziation.

Related

How integrate pull request Azure Devops Repository With Jenkins

I have a Git repository on the Azure Dev-ops server and use Jenkins for continuous integration build.
I want to know that how a specific branch like master Jenkins can automatically run the build and then notify the user via a shell log that the build was successful or not?
Microsoft seems to have the thing pretty well documented, Create a service hook for Azure DevOps Services and TFS with Jenkins
Set up the Jenkins job, set up the TFS / Azure DrevOps ServiceHook, off to the races.
We have it working fine for Jenkins 2.x and AzureDevOps on-prem. Best to use service accounts with limited necessary permissions on both sides.

Azure DevOps CI with Web Apps for Containers

I'm struggling to set up a CI process for a web application in Azure. I'm used to deploying built code directly into Web Apps in Azure but decided to use docker this time.
In the build pipeline, I build the docker images and push them to an Azure Container Registry, tagged with the latest build number. In the release pipeline (which has DEV, TEST and PROD), I need to deploy those images to the Web Apps of each environment. There are 2 relevant tasks available in Azure releases: "Azure App Service deploy" and "Azure Web App for Containers". Neither of these allow the image source for the Web App to be set to Azure Conntainer Registry. Instead they take custom registry/repository names and set the image source in the Web App to Private Registry, which then requires login and password. I'm also deploying all Azure resources using ARM templates so I don't like the idea of configuring credentials when the 2 resources (the Registry and the Web App) are integrated already. Ideally, I would be able to set the Web App to use the repository and tag in Azure Container Registry that I specify in the release. I even tried to manually configure the Web Apps first with specific repositories and tags, and then tried to change the tags used by the Web Apps with the release (with the tasks I mentioned) but it didn't work. The tags stay the same.
Another option I considered was to configure all Web Apps to specific and permanent repositories and tags (e.g. "dev-latest") from the start (which doesn't fit well with ARM deployments since the containers need to exist in the Registry before the Web Apps can be configured so my infrastructure automation is incomplete), enable "Continuous Deployment" in the Web Apps and then tag the latest pushed repositories accordingly in the release so they would be picked up by Web Apps. I could not find a reasoble way to add tags to existing repositories in the Registry.
What is Azure best practice for CI with containerised web apps? How do people actually build their containers and then deploy them to each environment?
Just set up a CI pipeline for building an image and pushing it to a container registry.
You could then use both Azure App Service deploy and Azure Web App for Containers task to handle the deploy.
The Azure WebApp Container task similar to other built-in Azure tasks, requires an Azure service connection as an input. The Azure service connection stores the credentials to connect from Azure Pipelines or Azure DevOps Server to Azure.
I'm also deploying all Azure resources using ARM templates so I don't like the idea of configuring credentials when the 2 resources (the Registry and the Web App)
You could also be able to Deploy Azure Web App for Containers with ARM and Azure DevOps.
How do people actually build their containers and then deploy them to each environment?
Kindly take a look at below blogs and official doc which may be helpful:
Deploy an Azure Web App Container(official)
Azure DevOps: Create a Web App for Containers CI/Release pipeline for
an ASP.NET Core app
Build & release a Container Image from Azure DevOps to Azure Web App
for Containers

Configure Jenkins CI build to use TFVC hosted in Azure DevOps

We recently migrated from an on-premise TFS server to Azure DevOps. Our team uses TFVC for source control, and I'm getting the following exception when Jenkins polls for new check-ins:
FATAL: This server requires federated authentication but no mechanism was available to handle it.
com.microsoft.tfs.core.exceptions.TFSFederatedAuthException: This server requires federated authentication but no mechanism was available to handle it.
Given the exception class name is TFSFederatedAuthException I suspect Azure is expecting some sort of OAuth integration, but Jenkins doesn't appear to support that for TFVC.
All I did was change the Collection URL for that Jenkins build to https://dev.azure.com/MyCompany. The Project path remains the same, and I verified this, because I was able to re-map all of my TFVC branches in Visual Studio by just pointing to the different collection URL and keeping the same project path. A screenshot of the Jenkins source control config is below:
This Jenkins server is internal with no public facing IP address or host name.
How can I allow Jenkins to poll a TFVC repository hosted in Azure DevOps in order to trigger a CI build in Jenkins?
Why not use Azure pipelines? That's a much bigger migration effort at the moment, and I'm just trying to solve a short term problem.
Using Azure pipelines is my long term goal, but I need to figure out how our automated tests can use an Oracle database first, because all data is deleted before each test is executed using Selenium.
Azure DevOps uses OAuth to communicate by default, putting in your username and password won't work because of that. Instead, the trick is to generate a Personal Access Token (I suspect the Code|Read+Write scope should do it) and pass that in.
For the username pass in ., for the password your generated personal access token. Give the token a nice name so you know which one is about to expire once you get the email notification.

Can VSTS use Local server? Not Cloud

we hope using just local server not cloud on VSTS
can we use it?
Actually, VSTS (Service) itself is a Cloud-based service. VSTS comes by default with some hosted agents,
Those hosted agented are given by Microsoft itself, where don't need to maintain/configure the server agent by yourself.
However, If you really want your own dedicated agent for build/release, you can install that by following this tutorial

TFS Build Server to use separate user for TFS access

I'm trying to set-up a new build server for my TFS 2013 installation.
On a new machine, I've configured a build user:
On test, this approved the user fine; however, running the readiness checks reports:
My interpretation of this error is that build.user does not have access to TFS; which is correct. My question is: can I run the build server using a domain user, but with a separate user for TFS access?
Can I run the build server using a domain user, but with a separate user for TFS access? Yes, you can and the build service account do not need to have the access to TFS.
Suggest you use TFSBuild as the build service account as MSDN recommend.
TFSBuild, which can be a local account, a domain account, or Local
Service in a workgroup
This service account is used when builds are configured and when build
status information is communicated between the build controller and
the build agents. More info for you
reference:https://msdn.microsoft.com/en-us/library/ms253149(v=vs.120).aspx

Resources