Accenture / adop-cartridge-java-pipeline

Apache License 2.0
2 stars 6 forks source link

Failing Reference Application Code Analysis stage #6

Open kramos opened 6 years ago

kramos commented 6 years ago

Built a clean stack, loaded this cartridge (FYI it isn't in the drop down), ran the main job and it failed.

[Java_Reference_Application] Running shell script

+ /tools/hudson.plugins.sonar.SonarRunnerInstallation/ADOP_SonarScanner/bin/sonar-scanner '-Dsonar.projectName=Simple Java project analyzed with the SonarQube Runner' -Dsonar.projectKey=java-sonar-runner-simple -Dsonar.projectVersion=1.0.1 -Dsonar.sources=src/main/java -Dsonar.language=java -Dsonar.sourceEncoding=UTF-8 -Dsonar.scm.enabled=false -Dsonar.jacoco.reportPath=target/jacoco.exec

INFO: Scanner configuration file: /tools/hudson.plugins.sonar.SonarRunnerInstallation/ADOP_SonarScanner/conf/sonar-scanner.properties

INFO: Project root configuration file: /workspace/ExampleWorkspace/PL/Java_Reference_Application/sonar-project.properties

INFO: SonarQube Scanner 2.9.0.670

INFO: Java 1.8.0_45 Oracle Corporation (64-bit)

INFO: Linux 4.10.0-27-generic amd64

INFO: User cache: /root/.sonar/cache

INFO: Publish mode

INFO: Load global settings

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 1.399s

INFO: Final Memory: 8M/226M

INFO: ------------------------------------------------------------------------

ERROR: Error during SonarQube Scanner execution

ERROR: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password.

ERROR: 

ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

script returned exit code 1
kramos commented 6 years ago

Ah sorry it is also failing for the Reference_Application_Code_Analysis job in the adop-cartridge-java cartridge. Must be a platform problem. I'm provisioning from a Mac to GCP, so the problem may lie there.

RobertNorthard commented 6 years ago

Thanks for reporting this. There is also an open issue https://github.com/Accenture/adop-cartridge-java-pipeline/issues/3 for this.

I suspect it is related to this change: https://github.com/Accenture/adop-jenkins/commit/ba570629fb84e4f7717f896199a9a91bd373c847

@dsingh07 can we revert the Jenkins image to the old version?

dsingh07 commented 6 years ago

@kramos Thanks for reporting this, this has now been automated and there is no longer a pre-requisite step to add your Sonar token (required for the new version of the scanner) in this PR: https://github.com/Accenture/adop-jenkins/pull/63

Please test again to see if you encounter this issue.