@1 tasks are deprecated and being dropped in the next release of SonarCloud. I’m trying to replace everything, but I keep getting:
##[error]ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to
Now, this is strange, as my @1 tasks work perfectly normal. This is what it looks like, for example:
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
condition: succeeded()
displayName: "Prepare analysis on SonarCloud"
inputs:
SonarCloud: "SonarCloud - Analysis"
organization: "x-apps"
scannerMode: CLI
configMode: manual
cliProjectKey: "x"
cliProjectName: "x"
extraProperties: |
xxx
This works just fine, but when I try to replace the entire task name with: SonarCloudPrepare@2
, it tells me I’m missing all those values and credentials that are already in place, since @1 is working.
I do believe this is related to the huge name of the @1 task, but I can’t figure out why is it like that, nor I can find an example of that online. Any help appreciated, thanks.