Load test run in Jenkins with Jmeter does not end - jenkins

I'm trying to run load tests on Jenkins through Jmeter (with Blazemeter). I've installed:
Install Jenkins on a machine that you have access to
Install the Jenkins Performance Plugin on the machine with Jenkins
Install Taurus on the Jenkins machine
Install Apache JMeter™ on our local machine
The only file that initially exists in the project folder is the blazedemo_script. jmx script generated in Jmeter and that works perfectly in this software.
The execution never ends. And I also don't understand why you can't find the modified file it generates if you enter it in the same directory.
Thank you very much.
I get the following log:
Lanzada por el usuario e73dbef17ee24d5c96bb99b8c598de0c
Ejecutando.en el espacio de trabajo C:\Program Files (x86)\Jenkins\workspace\blazermeter
[WARNING] Performance test: Job workspace contains spaces in path. Virtualenv does not support such path. Creating temporary workspace for virtualenv.
Performance test: Checking global bzt installation...
[blazermeter] $ bzt --help
Performance test: Found global bzt installation.
Performance test: run [bzt, blazedemo_script.jmx, C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml]
[blazermeter] $ bzt blazedemo_script.jmx "C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml"
13:24:19 INFO: Taurus CLI Tool v1.10.5
13:24:19 INFO: Starting with configs: ['C:\\Program Files (x86)\\Jenkins\\workspace\\blazermeter\\jenkins-report.yml', 'c:\\windows\\temp\\jmx_52sdqz.json']
13:24:19 INFO: Configuring...
13:24:19 INFO: Artifacts dir: C:\Program Files (x86)\Jenkins\workspace\blazermeter\2018-02-20_13-24-19.717000
13:24:19 INFO: Preparing...
13:24:20 WARNING: Failed to detect plugins for C:\Program Files (x86)\Jenkins\workspace\blazermeter\modified_blazedemo_script-1.jmx: [Error 2] El sistema no puede encontrar el archivo especificado
13:24:20 INFO: Starting...
13:24:20 INFO: Waiting for results...

Finally I have solved the problem using the following command and script in jenkins:
Shell Script -- bzt xxxx.yml -o scenarios.xxxx-webapp.variables.port-number=8080 -o scenarios.xxxx-webapp.variables.server-name=xxxx-es-web-stable-12-app -o scenarios.xxxx-mobile.variables.port-number=8080 -o scenarios.xxxx-mobile.variables.server-name=xxxx-es-web-stable-12-app -o modules.console.disable=true -o settings.artifacts-dir=./results --
Attached the configuration yml file:
execution:
- scenario: xxxxxx-webapp
- scenario: xxxxxx-mobile
scenarios:
xxxxxx-webapp:
script: ./xxxxxx_WEBAPP/xxxxxx_WEBAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 1
ramp: 10
xxxxxx-mobile:
script: ./xxxxxx_ANDROIDAPP/xxxxxx_ANDROIDAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 3
ramp: 10

Related

BrowserStack - Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure

In my local Jenkins Docker container, I could run my test plan without any issues .
Even without giving
However, in my office Jenkins server, I setup with that as per the https://www.browserstack.com/docs/automate/selenium/jenkins#configuring-browserstack-credentials
Yet I get this error.
org.openqa.selenium.remote.UnreachableBrowserException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'hidden', ip: 'hidden', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.15.2.el7.x86_64', java.version: '1.8.0_201'
Driver info: driver.version: RemoteWebDriver
at com.sam.browserstack.BrowserStackInitiation.setUp(BrowserStackInitiation.java:78)
Caused by: java.net.SocketTimeoutException: connect timed out
at com.sam.browserstack.BrowserStackInitiation.setUp(BrowserStackInitiation.java:78)
My build command is as per below.
export M2_HOME=/var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven3
export PATH=$PATH:$M2_HOME/bin
mvn --version
cd CommonPagesStorage
mvn clean install -DskipTests
cd ..
cd AutomationFrameworkDemo
mvn clean test -Dbrowser="${Browser}" -Dbrowser_version="${browser_version}" -Dos_version="10" -Dos="Windows" -Dlocalrun="false" -Dtestxml=src/test/TestSuites/${TestPlanName}
I also tried adding below code as exports but no avail.
export http_proxy="http://proxy-dev.can.myorg.com:8080"
export https_proxy="http://proxy-dev.can.myorg.com:8080"
export NO_PROXY=123.345.145.345,.can.myorg.com,localhost,200.0.0.2
I got the url whitelisted from netwrok team, also below lines of code were needed too.
https://username:password#hub-cloud.browserstack.com/wd/hub
(Since I use free style project, to get M2_HOME, I created a maven project with just mvn --version as a shell command and got the value from output console)
export M2_HOME=/opt/software/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin
export http_proxy="http://proxy-dev.aws.skynet.com:8080"
export https_proxy="http://proxy-dev.aws.skynet.com:8080"
export NO_PROXY=777.777.777.777,.aws.skynet.com,localhost,127.0.0.1
mvn --version
cd CommonPagesStorage
mvn clean install -DskipTests
cd ..
cd AutomationFrameworkDemo
mvn clean test -Dhttp.proxyHost=proxy-dev.aws.skynet.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy-dev.aws.skynet.com -Dhttps.proxyPort=8080 -Dbrowser="${Browser}" -Dbrowser_version="${browser_version}" -Dos_version="10" -Dos="Windows" -Dlocalrun="false" -Dtestxml=src/test/TestSuites/${TestPlanName}

how to include sonar scanner in a docker image

I have a dotnet image that is used as an agent for the Jenkins pipeline. Now I want to include sonar scanner in the image so that I can run an analysis and see if the coverage is good. If the coverage is not good then the build should fail. How to include the sonar scanner in my image.
I tried including the skilldlabs/sonar-scanner in my Dockerfile of the dotnet image. but when I run the container it directly executed the sonar cube commands and failed as the default sonarqube address is used.
Below is my current Dockerfile
FROM microsoft/dotnet:2.1-sdk
FROM skilldlabs/sonar-scanner:3.3
COPY some-ca.crt /usr/local/share/ca-certificates
COPY NuGet.Config /build/.nuget/NuGet/
VOLUME [ "/build/sources" ]
WORKDIR /build/sources
When I ran :
docker run --name sonar -it sonar
INFO: Scanner configuration file: /root/sonar-scanner-3.3.0.1492-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_191 Oracle Corporation (64-bit)
INFO: Linux 4.9.125-linuxkit amd64
INFO: User cache: /root/.sonar/cache
ERROR: SonarQube server [http://sonarqube:9000] can not be reached
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.433s
INFO: Final Memory: 3M/39M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to execute SonarQube
ERROR: Caused by: Fail to get bootstrap index from server
ERROR: Caused by: sonarqube: Try again
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug
logging.
How can I tell the container to provide the config for the sonar-scanner?
Instead of using the sonar scanner image into my image, I have installed dotnet-sonarscanner using the below command,
dotnet tool install -g dotnet-sonarscanner
I had to install a "coverlet" package to my unit test project by adding the below to my .csproj file of the unit test project.
<PackageReference Include="coverlet.msbuild" Version="2.6.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Now, whenever I want to send sonarqube my coverage results I run below command to generate the coverage file.
dotnet test ./UnitTests/UnitTests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
The above command will generate the coverage.opencover.xml file in the project folder.
Now use below commands to send the coverage
dotnet sonarscanner begin /k:"yourprojectkey" /d:sonar.host.url=https://yoursonarqubedomain.com /d:sonar.cs.opencover.reportsPaths="./UnitTests/coverage.opencover.xml" /d:sonar.coverage.exclusions="**Tests*.cs"
dotnet build
dotnet sonarscanner end
you can set the sonarscanner properties like report location and the URL etc., using /d:

Permission denied while running maven command jenkins

I am facing permission denied issues while running a maven clean test on a pom.xml present in /home/tes/pom.xml from jenkins. Any suggestions
Building in workspace /var/lib/jenkins/workspace/jenkins
[jenkins] $ /usr/share/maven/bin/mvn -f /home/tes/pom.xml clean test
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (/home/tes/pom.xml) has 1 error
[ERROR] Non-readable POM /home/tes/pom.xml: /home/tes/pom.xml (Permission denied)
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Just grant read access for all to the pom.xml file:
chmod +r /home/tes/pom.xml
The moderator has deleted my previous answer; I know that it has passed some time since this first post, but I ended up exactly in the same place. I insist in complementing all the answers because I've found what was the problem in my case,having the same result as reported in this case.
I'd like to comment that, in my case, the reason was that I did not have JDK, but just JRE configured in JAVA_HOME of the Global Tool Configuration > JDK > JDK Installation. As a matter of fact Jenkins warns you that the path is not pointing to something containing a JDK.
JDK is needed for some Plugins, like Maven Integration or Docker Pipeline, as Java requirements section in Jenkins documentation states. So this must checked because it surprisingly results in the weird error:
> git rev-parse refs/remotes/origin/celsus_0-1-0^{commit} # timeout=10
Checking out Revision 0c533cf2327a416a254afa2348abafe7790ba67f (refs/remotes/origin/celsus_0-1-0)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0c533cf2327a416a254afa2348abafe7790ba67f # timeout=10
Commit message: "first embrio of container image"
> git rev-list --no-walk 0c533cf2327a416a254afa2348abafe7790ba67f # timeout=10
Parsing POMs
Established TCP socket on 40251
[build] $ /usr/lib/jvm/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/usr/share/maven/boot/plexus-classworlds-2.x.jar:/usr/share/maven/conf/logging jenkins.maven3.agent.Maven35Main /usr/share/maven /var/cache/jenkins/war/WEB-INF/lib/remoting-4.5.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 40251
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/usr/lib/jvm/bin/java" (in directory "/var/lib/jenkins/workspace/build"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
at hudson.Launcher$ProcStarter.start(Launcher.java:508)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:802)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
at hudson.model.Run.execute(Run.java:1907)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 13 more
Finished: FAILURE
Similar case as originated this case, as the different nature of the solutions proposed points out. I'd like to bring the attention that these errors having to do with permissions, or parsing of the pom might hide the real root cause, and error messages are not always as explicit and clear as they should be.
Hope it helps others bumping into the same issue.
I installed maven plugin for jenkins and provided the fully qualified path of pom.xml in root pom.xml and it fixed the issue
I think the reason this happens is maven has the right to run pom.xml ie. mvn command can be run through terminal but not through jenkins.
So we will need to add the current user to jenkins for it to work.
Follow this blogpost. It worked for me:
blogpost

ant build failes on Jenkins

When I start the Jenkins build, on arriving on ant-build-step the build is canceled immediately with the following stack:
...
[PROJECT] $ cmd.exe /C "D:\jenkins\tools\hudson.tasks.Ant_AntInstallation\Ant\bin\ant.bat -file build-jenkins.xml -Djenkins.result.dir=${JENKINS.WORKSPACES}/Results "-Dbranch=*/develop" -Djenkins.result.dir=C:/Tools/Jenkins/Results -Djenkins.workspace.dir=C:\Tools\Jenkins\Project-SNAPSHOT\workspace/PRO_56/PRO/java/Project -Dproject.path=C:\Tools\Jenkins\Project-SNAPSHOT\workspace clean.compile.jar.server.snapshot -v && exit %%ERRORLEVEL%%"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
...
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
I get no debug messages, nothing.
I've got other project with a similar/equal config which work. I think it could be a incompatibility of my plugins.
Has anyone experienced this bug before?
In my case the problem was a big M in the java options of the ant-build-step.
Here no m for Megabit und M für Megabyte.
-Xmx1024M
-Xms1024m

Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip

SonarQube - 5.3
C# Plugin - 5.0
SonarQube Scanner 2.1
TFS 2015 Update 2.1
When I execute build on build server, it says
Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
I can login to Sonar server, I have also added path of Sonar MSBuild.SonarQube.Runner.exe in path variable under environment variables.
Am I missing anything here?
Can anybody please help me to solve this?
2016-07-18T12:20:40.6290351Z Checking if artifacts directory exists: D:\BuildAgent\_work\8\a
2016-07-18T12:20:40.6290351Z Deleting artifacts directory.
2016-07-18T12:20:40.6330353Z Creating artifacts directory.
2016-07-18T12:20:40.6330353Z Checking if test results directory exists: D:\BuildAgent\_work\8\TestResults
2016-07-18T12:20:40.6330353Z Deleting test results directory.
2016-07-18T12:20:40.6340353Z Creating test results directory.
2016-07-18T12:20:40.6880384Z Starting: Get sources
2016-07-18T12:20:40.6930387Z Entering TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:40.6930387Z localPath=D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.6930387Z clean=False
2016-07-18T12:20:40.6930387Z sourceBranch=refs/heads/master
2016-07-18T12:20:40.6930387Z sourceVersion=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.6940388Z Syncing repository: PSA (Git)
2016-07-18T12:20:40.6940388Z repository url=http://server:8080/tfs/AjayTestCollection/_git/PSA
2016-07-18T12:20:40.6950388Z checkoutSubmodules=False
2016-07-18T12:20:40.7570424Z Starting fetch...
2016-07-18T12:20:40.9230519Z Checking out 8a38426975d589b8ba02ae545fa989588221143c to D:\BuildAgent\_work\8\s
2016-07-18T12:20:40.9570538Z Checked out branch refs/heads/master for repository PSA at commit 8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z commit=8a38426975d589b8ba02ae545fa989588221143c
2016-07-18T12:20:40.9570538Z Leaving TfsGitSourceProvider.PrepareRepositoryAsync
2016-07-18T12:20:41.0360583Z Running tasks
2016-07-18T12:20:41.0510592Z Starting task: NuGet restore **\*.sln
2016-07-18T12:20:41.0770607Z Set workingFolder to default: D:\BuildAgent\tasks\NuGetInstaller\0.1.17
2016-07-18T12:20:41.1000620Z Executing the powershell script: D:\BuildAgent\tasks\NuGetInstaller\0.1.17\NuGetInstaller.ps1
2016-07-18T12:20:41.3220747Z D:\BuildAgent\agent\worker\tools\NuGet.exe restore "D:\BuildAgent\_work\8\s\CIBuildPSA\CIBuildPSA.sln" -NonInteractive
2016-07-18T12:20:41.6210918Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
2016-07-18T12:20:41.6870956Z Finishing task: NuGetInstaller
2016-07-18T12:20:41.6950960Z Starting task: Fetch the Quality Profile from SonarQube
2016-07-18T12:20:41.6970961Z Executing the powershell script: D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.aps1
2016-07-18T12:20:41.8101026Z ##[debug]
2016-07-18T12:20:42.0451161Z SonarQube Scanner for MSBuild 1.1
2016-07-18T12:20:42.0461161Z Default properties file was not found at D:\BuildAgent\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
2016-07-18T12:20:42.0471162Z Pre-processing started.
2016-07-18T12:20:42.0481162Z Preparing working directories...
2016-07-18T12:20:42.0491163Z Checking for updates...
2016-07-18T12:20:42.0511164Z ##[error]Could not find a file on the SonarQube server. Url: http://server:9081/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2016-07-18T12:20:42.0521165Z ##[error]Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
2016-07-18T12:20:42.0531165Z ##[error]Pre-processing failed. Exit code: 1
2016-07-18T12:20:42.0821182Z ##[error]Unexpected exit code received from batch file: 1
2016-07-18T12:20:42.0961190Z Finishing task: SonarQubePreBuild
2016-07-18T12:20:42.1451218Z Starting task: Copy Files to: $(build.artifactstagingdirectory)
2016-07-18T12:20:42.1541223Z Set workingFolder to default: D:\BuildAgent\tasks\CopyFiles\1.0.13
2016-07-18T12:20:42.3601341Z ##[debug]check path : D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3601341Z ##[debug]set resource file to: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.3611341Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\task.json
2016-07-18T12:20:42.3611341Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.3621342Z ##[debug]Contents=**\bin\release\**
2016-07-18T12:20:42.3621342Z ##[debug]SourceFolder=D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3621342Z ##[debug]check path : D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3631342Z ##[debug]TargetFolder=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.3631342Z ##[debug]CleanTargetFolder=false
2016-07-18T12:20:42.3631342Z ##[debug]OverWrite=false
2016-07-18T12:20:42.3631342Z ##[debug]include content pattern: **\bin\release\**
2016-07-18T12:20:42.3881357Z ##[debug]find D:\BuildAgent\_work\8\s
2016-07-18T12:20:42.3891357Z ##[debug]179 matches.
2016-07-18T12:20:42.3951361Z ##[debug]allFiles contains 128 files
2016-07-18T12:20:42.3951361Z ##[debug]Include matching D:\BuildAgent\_work\8\s\**\bin\release\**
2016-07-18T12:20:42.3991363Z ##[debug]Include matched 0 files
2016-07-18T12:20:42.4001364Z ##[debug]load strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\lib.json
2016-07-18T12:20:42.4011364Z ##[debug]load loc strings from: D:\BuildAgent\tasks\CopyFiles\1.0.13\node_modules\vsts-task-lib\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.4021365Z found 0 files
2016-07-18T12:20:42.4081368Z Finishing task: CopyFiles
2016-07-18T12:20:42.4121370Z Starting task: Publish Artifact: drop
2016-07-18T12:20:42.4131371Z Set workingFolder to default: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28
2016-07-18T12:20:42.5991477Z ##[debug]check path : D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]set resource file to: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6001478Z ##[debug]system.culture=en-US
2016-07-18T12:20:42.6011479Z ##[debug]load strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\task.json
2016-07-18T12:20:42.6011479Z ##[debug]load loc strings from: D:\BuildAgent\tasks\PublishBuildArtifacts\1.0.28\Strings\resources.resjson\en-US\resources.resjson
2016-07-18T12:20:42.6021479Z ##[debug]system.hosttype=build
2016-07-18T12:20:42.6021479Z ##[debug]PathtoPublish=D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6021479Z ##[debug]check path : D:\BuildAgent\_work\8\a
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactName=drop
2016-07-18T12:20:42.6031480Z ##[debug]ArtifactType=Container
2016-07-18T12:20:42.6041480Z ##[debug]TargetPath=\\my\share\Main_Sonar\20160718.7
2016-07-18T12:20:42.9871699Z Max Concurrent Uploads 4, Max Creators 1
2016-07-18T12:20:43.0141715Z Found 0 files to upload.
2016-07-18T12:20:43.0171717Z Created 0 files without uploading content. Total files processed 0
2016-07-18T12:20:43.0181717Z Uploaded artifact 'D:\BuildAgent\_work\8\a' to container folder 'drop' of build 102.
2016-07-18T12:20:43.2781866Z Associated artifact 83 with build 102
2016-07-18T12:20:43.2871871Z Finishing task: PublishBuildArtifacts
2016-07-18T12:20:43.2891872Z ##[error]Task SonarQubePreBuild failed. This caused the job to fail. Look at the logs for the task for more details.
After installing SonarQube server, you need to sign in the sever as an administrator, go to the Update Center (Settings | System | Update Center), and install the SonarQube C# Plug-in.
Also, SonarQube must be restarted after installing the plugin.
You may check whether you have completed the steps above. In the following link, there is detailed guide of how to install and configure SonarQube, you can chek it:
https://github.com/SonarSource-VisualStudio/sonar-.net-documentation/blob/master/doc/installation-and-configuration.md#setup-sonarqube-server

Resources