Hello, when I want to build from bamboo, the task always fails.
Here are the logs, how can proceed?
I see here allways this → Error occurred while running Task ‘SonarScanner(2)’ of type
ch.mibex.bamboo.sonar4bamboo:sonar4bamboo.sonarscannertask.
error 29-Aug-2022 16:15:48 com.atlassian.bamboo.task.TaskException: Cannot deduce sonar.projectKey for this build. Please configure the project key in the Sonar task.
Log:
simple 29-Aug-2022 16:15:47 Build Software Deployment Testing - SonarQube.Plugin.Test - Default Job #3 (SDT-SON-JOB1-3) started building on agent Build agent 01, bamboo version: 8.1.2
simple 29-Aug-2022 16:15:47
simple 29-Aug-2022 16:15:47 Build working directory is D:\bamboo-home\local-working-dir\SDT-SON-JOB1
simple 29-Aug-2022 16:15:47 Executing build Software Deployment Testing - SonarQube.Plugin.Test - Default Job #3 (SDT-SON-JOB1-3)
simple 29-Aug-2022 16:15:47 Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
simple 29-Aug-2022 16:15:47 Checking out into D:\bamboo-home\local-working-dir\SDT-SON-JOB1
simple 29-Aug-2022 16:15:47 Updating source code to revision: 8922208574d789c2a069f4e89e22bafe03db00fa
simple 29-Aug-2022 16:15:47 'C:\Program Files\Git\cmd\git.exe' log -1 --encoding=UTF-8 --format=%H HEAD
simple 29-Aug-2022 16:15:47 'C:\Program Files\Git\cmd\git.exe' ls-remote ssh://4d6ccabb-b172-4de3-a976-a468d7bf08dc@127.0.0.1:4331/adt/sonarqube.plugin.test.git
simple 29-Aug-2022 16:15:47 Fetching 'refs/heads/develop' from 'ssh://git@bitbucket-bb.tdk-electronics.biz:7999/adt/sonarqube.plugin.test.git'.
simple 29-Aug-2022 16:15:47 'C:\Program Files\Git\cmd\git.exe' fetch ssh://4d6ccabb-b172-4de3-a976-a468d7bf08dc@127.0.0.1:4331/adt/sonarqube.plugin.test.git +refs/heads/develop:refs/heads/develop --update-head-ok --progress --verbose
simple 29-Aug-2022 16:15:48 Warning: Permanently added '[127.0.0.1]:4331' (RSA) to the list of known hosts.
simple 29-Aug-2022 16:15:48 From ssh://127.0.0.1:4331/adt/sonarqube.plugin.test
simple 29-Aug-2022 16:15:48 = [up to date] develop -> develop
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' log -1 --encoding=UTF-8 --format=%H 8922208574d789c2a069f4e89e22bafe03db00fa
simple 29-Aug-2022 16:15:48 Checking out revision 8922208574d789c2a069f4e89e22bafe03db00fa.
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' remote set-url origin file://D:\bamboo-home\local-working-dir\_git-repositories-cache\2e106bf4eb4bbc5ad68ccb2adfb2134b694b9fdb
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' fetch
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' show-ref develop
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' checkout -f develop
simple 29-Aug-2022 16:15:48 Your branch is up to date with 'origin/develop'.
simple 29-Aug-2022 16:15:48 Already on 'develop'
simple 29-Aug-2022 16:15:48 'C:\Program Files\Git\cmd\git.exe' remote set-url origin file://D:\bamboo-home\local-working-dir\_git-repositories-cache\2e106bf4eb4bbc5ad68ccb2adfb2134b694b9fdb
simple 29-Aug-2022 16:15:48 Updated source code to revision: 8922208574d789c2a069f4e89e22bafe03db00fa
simple 29-Aug-2022 16:15:48 Finished task 'Checkout Default Repository' with result: Success
simple 29-Aug-2022 16:15:48 Running pre-build action: VCS Version Collector
simple 29-Aug-2022 16:15:48 Running pre-build action: Artifactory Release Staging
simple 29-Aug-2022 16:15:48 Running pre-build action: Build Log Labeller Pre Build Action
simple 29-Aug-2022 16:15:48 Starting task 'SonarScanner' of type 'ch.mibex.bamboo.sonar4bamboo:sonar4bamboo.sonarscannertask'
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Found repository definition com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-stash:bbserver
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Going to use global SonarQube server settings for the analysis...
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: No license error detected
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Legacy branch value in task settings: 'Some(true)'
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: is legacy branch enabled? true
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Incremental mode is not enabled
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Legacy branch value in task settings: 'Some(true)'
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: is legacy branch enabled? true
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Branch target name will not be set because legacy branching enabled or no Bamboo user configured
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: Quality gate status value in task settings: 'Some(skip)'. From brokenQualityGateOption={Some(skip)} failBuildForBrokenQualityGates=None
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: is legacy branch enabled? skip
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: request: http://svbb0046:9000/api/server/version
simple 29-Aug-2022 16:15:48 SONAR4BAMBOO: response with status code 200: 8.9.8.54436
error 29-Aug-2022 16:15:48 Error occurred while running Task 'SonarScanner(2)' of type ch.mibex.bamboo.sonar4bamboo:sonar4bamboo.sonarscannertask.
error 29-Aug-2022 16:15:48 com.atlassian.bamboo.task.TaskException: Cannot deduce sonar.projectKey for this build. Please configure the project key in the Sonar task.
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.sonar.projectinfo.SonarProjectInfoAnalyzer.throwMissingProjectKey(SonarProjectInfoAnalyzer.scala:37)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.sonar.projectinfo.SonarProjectInfoAnalyzer.$anonfun$analyzeProjectInfo$3(SonarProjectInfoAnalyzer.scala:28)
error 29-Aug-2022 16:15:48 at scala.Option.getOrElse(Option.scala:201)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.sonar.projectinfo.SonarProjectInfoAnalyzer.analyzeProjectInfo(SonarProjectInfoAnalyzer.scala:28)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.SonarBranchOrPrParamAnalyzer.appendBranchToProjectKey(SonarBranchOrPrParamAnalyzer.scala:77)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.SonarBranchOrPrParamAnalyzer.deduceSonarAnalysisParameters(SonarBranchOrPrParamAnalyzer.scala:47)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.AbstractSonarTask.getCommandLine(AbstractSonarTask.scala:264)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.AbstractSonarTask.executeSonarAnalysis(AbstractSonarTask.scala:103)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.AbstractSonarTask.$anonfun$execute$1(AbstractSonarTask.scala:66)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.Logging$.withLogScope(Logging.scala:94)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.Logging$.withTaskLogging(Logging.scala:33)
error 29-Aug-2022 16:15:48 at ch.mibex.bamboo.sonar4bamboo.tasks.AbstractSonarTask.execute(AbstractSonarTask.scala:58)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:321)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:321)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:205)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:177)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:169)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:162)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:122)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error 29-Aug-2022 16:15:48 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error 29-Aug-2022 16:15:48 at java.lang.Thread.run(Unknown Source)
simple 29-Aug-2022 16:15:48 Running post build plugin 'NCover Results Collector'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Artifact Copier'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Artifactory Release Management Staging'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Artifactory Build Info Copier'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Artifactory Gradle Properties Info Copier'
simple 29-Aug-2022 16:15:48 Running post build plugin 'npm Cache Cleanup'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Build Results Label Collector'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Clover Results Collector'
simple 29-Aug-2022 16:15:48 Running post build plugin 'Docker Container Cleanup'
simple 29-Aug-2022 16:15:48 Finalising the build...
simple 29-Aug-2022 16:15:48 Stopping timer.
simple 29-Aug-2022 16:15:48 Build SDT-SON-JOB1-3 completed.
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'NCover Results Collector'
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'Build Hanging Detection Configuration'
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'Bamboo project link creator'
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'Build Labeller'
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'Clover Delta Calculator'
simple 29-Aug-2022 16:15:48 Running on server: post build plugin 'Maven Dependencies Postprocessor'
simple 29-Aug-2022 16:15:48 All post build plugins have finished
simple 29-Aug-2022 16:15:49 Generating build results summary...
simple 29-Aug-2022 16:15:49 Saving build results to disk...
simple 29-Aug-2022 16:15:49 Store variable context...
simple 29-Aug-2022 16:15:49 Indexing build results...
simple 29-Aug-2022 16:15:49 Finished building SDT-SON-JOB1-3.