Configure SonarQube in VSTS Hosted agent or as an Azure PaaS for CI - azure

As part of including SonarQube in our CI pipeline for code coverage , we created a SonarQube server endpoint pointing to SonarQube server hosted in Azure VM. But we are in the verge of removing our dependency on IaaS, so is there any other alternatives for hosting SonarQube server .
Has anyone tried the same or have similar experiences?

The VSTS Hosted agent isn’t including SonarQube server, so you can’t configure SonarQube in VSTS Hosted agent.
You can use sonarcloud or setup a sonarqube server on your server machine.

Related

Can we deploy jhipster applications to on-premises or self-hosted server?

In the jhipster homepage , I could not find how to deploy to a on-premises or self-hosted server.
So I googled with keywords "jhipster deploy on-premises" or "jhipster deploy self-hosted", but I could not find the associated information.
Can we deploy jhipster applications to on-premises or self-hosted server?
Any help would be appreciated.

Access Nuget Packages hosted in private Nuget Server in Azure Pipelines

We have few nuget packages pushed to Private nuget packages, trying to setup Azure Pipelines however during the build it says error NU1101: Unable to find package while running step "nuget store"
NOTE in Local Visual studio it will be accessible when we are in VPN
If you are using private nuget server. You will need to create self-hosted agent on your local machines that have access to the private nuget server. And select your private agent pool to run your Azure pipeline on the self hosted agents.
For your private nuget server is unavailable to the cloud hosted agents. If you run your pipeline on the cloud hosted agents, the nuget restore step in your pipeline will fail to find your package.
If you are working behind a proxy. Please check below document to configure the proxy settings for the self-hosted agents.
Run a self-hosted agent behind a web proxy

Is port 9000 allowed in Microsoft hosted ubuntu agent in azure devops

I have sonarqube configured in my localhost with 9000 port http://www.localhost:9000/
Now, I have created a service connection in azure DevOps with this url.
when I tried to analyze a project via pipeline building on a Microsoft hosted ubuntu image.. it throws error as error connection refused for port 9000 during prepare sonaranalysis task.
error:
##[error][SQ] API GET '/api/server/version' failed, error was: {"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"www.localhost","host":"www.localhost","port":"9000"}
Finishing: SonarQubePrepare
Could someone help to fix this?
If the sonarqube configured in your local machine. Cloud hosted agents will not be able to access to the local hosted sonarqube server, for your local machine cannot be accessed from Microsoft cloud hosted agents.
You will need to create a self-hosted agent on your local machine. And run your pipeline on this self-hosted agent by targeting your private agent pool when queuing your pipeline. For the local hosted sonarqube server can be accessed from your local machine.
Another workaround is to expose your localhost:9000 to the public network using tools like ngrok as 4c74356b41 mentioned.
yeah, basically this will never work, you need to have an externally available endpoint for your sonarqube and connect to that one
so something like ngrok.com might help you with that if you want to host sonarqube on your workstation

How to deploy using Azure build agent to internal server?

I am using ( Agent pool : Azure pipeline ; Agent specification : windows-2019 )
for CI/CD build, I also want same agent to deploy war to Azure VM which is bound to specific domain.
Although, I am able to deploy war using self hosted agent, but for this I have to allocate one VM for CI/CD builds.
I want to eliminate this and use the same agent to build and deploy war to server.
You don't. Microsoft-provided hosted agents don't have connectivity to your on-prem environment. If you need to deploy to a server that is not internet-addressable, then you need to create a private agent within your network.
According to this document:
If your on-premises environments do not have connectivity to a Microsoft-hosted agent pool (which is typically the case due to intermediate firewalls), you'll need to manually configure a self-hosted agent on on-premises computer(s).
If in your case, it's the internal firewalls that block the hosted agent, I think you do have the need to use self-agent for deployment. Otherwise, you can try port forwarding like 4c74356b41 suggests.

How to integrate a Continous Integration with Microsoft Azure

I'm developing a Node.js App but I deploy this app in a Azure Virtual Machine (Ubuntu) manually. I want to deploy it from specific GitHub branch (Master) into Virtual Machine, can I use Appveyor?
You can use Appveyor CI which is available on the Azure Marketplace which is published by Appveyor.
Link: Appveyor CI

Resources