Not able to find SonarQube Service Connection in Azure Devops in new service connection list - azure-devops

Tried looking all over couldn't find the option or the solution to get the option, any inputs would be deeply helpful.
My Azure DevOps Version:
I'm pretty sure the Azure DevOps is the latest.

You need to install the SonarQube extension:
After that you will see it:

you need to install these both extensions
sonar cloud -- https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud
sonar qube -- https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube
after that you can see the service endpoints.

Related

SonarQube in Azure DevOps wtih Microsoft Hosted Agent

As our SonarQube instance was not accessible over internet, I am getting the below error in "Prepare analysis on SonarQube" task during the analysis of a java project.
[SQ] API GET '/api/server/version' failed, error was: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"ABC.XYZ.com","host":"ABC.XYZ.com","port":443}
Some links suggests that by adding proxy variable will solve this issue. But don't know how to do it. Some links suggests to install agent service (from Deployment Pool section) will solve this issue. In that case we need to do it for multiple organization.
So anyone please let me know what will be the proper solution for this issue.
For this problem when using SonarQube on Azure DevOps Services (VSTS), installing self-hosted agents generally is a better way to solve the problem.
To install self-hosted agents on multiple organizations, you can try to set up a shell script that executing the installation command lines in a loop to install a self-hosted agent for each organization.

Unable to find "artifactory" in the list of "service connections" in Azure Devops

I am new to Azure Devops and integration of Azure Devops with Artifactory.
I am following up the documentation and trying to add a service connection to Artifactory, from my free account of Azure Devops.
But I cannot find "Artifactory" in the list of service connections, as mentioned in the documentation.
Can somebody please help me how to create a service connection to Artifactory?
Documentation link : https://www.jfrog.com/confluence/display/JFROG/Artifactory+Azure+DevOps+Extension#ArtifactoryAzureDevOpsExtension-ConfiguringtheArtifactoryServiceEndpoint
Below is the list of service connections which I see in my Azure Devops :
In Azure Devops, you need to install the extension: JFrog Artifactory.
Then you could get the Artifactory Service Connections
Here is a doc about installing the Extension in Azure Devops (Search JFrog Artifactory).
In order to work with Artifactory from the Azure Devops, you need to install the Artifactory plugin. Please refer to this JFrog wiki for more insights.

How to integrate OnPrem Azure DevOps Server with the cloud one?

My firm has the Azure DevOps online version where we have all our projects and repo's. We were not able to configure CI/CD for the repo's because our internal server network doesn't have access to the internet.
To overcome this issue, we built a new server that has access to the internet and also to the internal network. On the new server, we installed and configured Azure DevOps Server 2019. We don't want to migrate our repo's from the cloud version to the online version.
I am trying to link the OnPrem repo to the cloud repo but it was not working. I issued a PAT on the cloud version and added it as a service connection under Pipelines in the OnPrem version but still, I am not able to see and link the cloud repo's.
I can clone the repo from the cloud to the OnPrem server but that will not get the latest code as the code is being checked in the cloud repo's
Can anyone please guide me on how to link both of them, please.
Thanks!!!
I don't think there's a meaningful way to integrate Azure DevOps Services and Azure DevOps Server, as they are essentially the same product. I assume (but don't know) that you're looking to integrate Azure DevOps Services to on-premise builds and deployments, as you state that you want to keep the repos in Azure DevOps Services. So, in essence, you want to run build and deployment group agents in on-premise environment.
Take a look at the agent-documentation and especially the communication subsection:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops
Or this old blog post, from which the communication section originates:
https://devblogs.microsoft.com/devops/deploying-to-on-premises-environments-with-visual-studio-team-services-or-team-foundation-server/
The ideal solution would probably be that you run self-hosted build agents in your server that's open to internet, and configure an agent pool for them in Azure DevOps Services. For deployments, you'll want to use Deployment Groups and install deployment group agents to target servers, where they'll just need outbound 443 access for communicating with Azure DevOps Services.
If that's not possible, you'd have to install deployment agents to the build machine, which then sees your other on-premise servers, but this is rather unsatisfactory solution since you'd either have to rely on WinRm capabilities for deployments, or expose too much network between your build server and other on-premise servers.

Azure pipeline - How do I deploy code to Preregistered application

Our devops team have created an application (ex:athena) and registered with AD. They also have given us Service Principle.
The question I have is , how do I deploy my code in GitHub to the application (athena) that the devops team created for me using the “Deploy to kubernetes service” configuration template ?
Apologies in advance, as I am not proficient in Azure and this shows my gap in understanding.
The Information I have are :
Repository - GitHub (I have done the appropriate authorisation and can see the repository)
Service Principle (create by devops team)
Application (created by devops team)
I have created a Container Registry and Kubernetes service using azure portal
Now, I want to use the “Deploy to kubernetes service” configuration template.
Help much appreciated.
If you want to use this Deploy to kubernetes service, you must get two service connection : Azure Resource Manager and Kubernetes Service Connection.
So, first, you need to configure the connection between Azure Kubernetes, ARM and Azure Devops. Enter project setting->service connection, open New Service Connection and select Kubernetes. Input the relevant configure according to your Azure:
And so do with Azure Resource Manager, you can follow this doc to configure it. Here is my ARM connection you can refer:
Then, you can begin your build and release pipeline.
Deploy to kubernetes service task used in release pipeline. In build pipeline, you must run docker build, push task to finish pushing to Azure registry Container.
And then, run this deploy task in release. You can refer to this blog which written by Azure DevOps Labs: Deploying a multi-container application to Azure Kubernetes Services. It has detailed steps you can refer.
In addition, there has two build source type. One is you import your github repos into Azure Devops repos. So the build can be trigger by Azure Devops Repos. And the other is select Github as your build source, in this type, you can triggered directly by your github instead of use Azure Devops repos:
And also, this need you get the service connection with your Github first. Then, authorize it during the build pipeline.

Is it possible to run an On premise SonarQube Server on azure devops deploy pipeline?

I'm deploying my application to an on promise IIS server and I would like to run a sonarQube Analytics at the same time, using a self-hosted agent, but the sonarQube server is in another server.
I was thinking to run a command using cmd to start the analytics, but I'm not sure how to do this because sonarQube is in another server.
Is it possible to run an On premise SonarQube Server on azure devops deploy pipeline?
The short answer is yes.
You don't need SonarQube to be hosted on same server. You can use SonarScanner as client on your build server and the scanner will push data to SonarQube.
There is an image about SonarQube Architecture and Integration:
obviously, SonarQube Scanner should be what you are looking for.
Read more about SonarScanner here:
https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
Certificate from: how to use one sonar server on multiple machines.
Hope this helps.
Yes, you can use your server. The main condition is availability of your SonarQube server from internet because Azure DevOps creates a service connection. You can find lessons here: Managing technical debt with SonarQube and Azure DevOps