SonarQube QUALITY GATE STATUS for a project : "failed" - sonarqube

Where can I check the reason?
I have no idea how to make failed to succeeded.

Related

Sonar Qube code analysis failed with exist code 1

I am using sonar qube for code analyzer but getting error as below:
Preparing `SonarQube` scanner...
`realpath`: '': No such file or directory
ERROR in /opt/resource/out : line 85 with exit code 1
and not getting specific reason why it is failing.
You are missing some input in your configuration, most likely something with maven (default settings.xml pointing to wrong repo). Default maven install folder for concourse-sonarqube-resource is /opt/apache-maven. By using the debug flag, whole trace (mvn -X) will be shown and you get your specific reason.
type: sonar-runner
source:
host_url: ((sonarqube.url))
__debug: true

After Bamboo CI runs it's indicating build job is success even though some of the Cypress tests are failing

Running Cypress tests in Bamboo.Bamboo build job is showing success with green mark even though Cypress tests has some failure tests.
I expect, if cypress test has some failure then Bamboo build status indicating that build is failed with red cross symbol
Bamboo always expects the exit code exit 0 for the build to pass successfully. Any other exit code value will fail the build.
You may add the below snip at the end of your plan in a script task based on where your build is running and then the Build log should list the exit code result.
For Windows based agents:
echo ==========
$LastExitCode
echo ==========
For Linux based agents:
echo ==========
echo $?
echo ==========
This should give you an idea on what is being sent back to Bamboo to decide. You may then alter your plan accordingly to produce the right error code.

How to add sonar scanner in GoCD?

I am creating a GoCD pipeline to run sonar analysis for my project. Up to now, I have successfully configured sonar properties on my local file and it successfully pushes the metrics to the sonar server.
The problem occurs when creating a GoCD pipeline to run the analysis. I am unable to successfully install sonar scanner on GoCD agents. The error that I get when executing command sonar scanner from the pipeline is "SONAR_RUNNER_HOME does not point to a valid installation directory".
Currently We are running sonar-scanner from GoCD pipeline and checking SonarQube Quality Gates correctly.
What we do was the following: I created a bash script that launch the sonar-scanner. This script (and other ones used by our GoCD configuation) is inside a second Git Material (the first one is the Project source code). We have installed the 'SonarQube Quality Gates Task Plugin' to evaluate our SonarQube quality gates.
So we have a Job in our Pipeline with the following tasks:
Type: Custom Command --- Run if: Passed --- Command: /bin/bash
--- Arguments: path_to_sonar_scanner_bash_script_launcher.sh --- Working Directory: your_working_dir
Type: SonarQube - Quality Gate --- Run if:
Passed --- Key of the SonarQube project: sonar_qube_project_id ---
Fail Quality Gate result: error Sonar --- Api Url:
http://your_sonar:9000/api
We have GoCD agent and sonarqube installed in the same machine.
I expect this help you.

TFS2015 running SoapUI test as unit tests - Error: Could not create the Java Virtual Machine

I'm trying to run SoapUI tests as unit tests as described here:
http://blog.simplecode.eu/post/Soap-UI-testing-with-MsTest
Everything works nice when I'm running test locally in visual studio.
But when I'm trying to run those tests during the build process on tfs2015 i get "Error: Could not create the Java Virtual Machine":
My other unit tests during that build are performed correctly.
Anyone had similar issue?
It's not a really build error in TFS. You can see the result in your screenshot, build partially succeeded.
Currently, by default the build result is "Failed" if anything failed to compile, "Partially Succeeded" if there are any unit test failures, and "Succeeded" otherwise.
Build is reported as "Partially Succeeded" when the "Test Success" property is set to "False" and "CompilationSuccess"="True"
So your error is more like something in your code fails the test or some configuration related to test in the build definition or build agent environment. Since everything works nice when you are running test locally in visual studio.
Seems disable code coverage fixed the issue.
Manage, to fix that - problem was enabled code coverage. Disabling it fixed to problem.

StackOverflowException with JetBrains dotCover in TeamCity

I use TeamCity to support continuous integration of a project.
Currently, when I run .NET Code Coverage: JetBrains dotCover for a specific project then the dotCover crashes with StackOverflowException.
Also, the unit test 'TestSomething' is correct and always runs successfully.
Here are the error logs snapshot from the build:
[MyAssembly.dll] MyAssembly.MyTester.TestSomething (12s)
[18:28:37][MyAssembly.MyTester.TestSomething]
[18:28:37][MyAssembly.MyTester.TestSomething] Process is terminated due to StackOverflowException.
[18:28:38][MyAssembly.MyTester.TestSomething] [JetBrains dotCover] Coverage session finished [12/22/2015 6:28:38 PM]
[18:28:38][MyAssembly.MyTester.TestSomething] [JetBrains dotCover] Analysed application exited with code '-1073741571'
[18:28:38][MyAssembly.MyTester.TestSomething] [JetBrains dotCover] Coverage session finished but no snapshots were created.
[18:28:39][MyAssembly.MyTester.TestSomething] ##teamcity[importData type='dotNetCoverage' tool='dotcover' file='C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover33181917853826188801.data']
[18:28:37][Step 3/10]
[18:28:37][Step 3/10] Process is terminated due to StackOverflowException.
I really cannot understand why this happens.
Any help from experts?
This was a bug in JetBrains dotCover.

Resources