ERROR: Validation of project reactor failed:
o “PROJECT_NAME:bugfix/fix_code” is not a valid project or module key. Allowed characters are alphanumeric, ‘-’, ‘_’, ‘.’ and ‘:’, with at least one non-digit.
SonarScanner and SonarQube failed because of “/” slash between bugfix and fix_code
Maybe it’s more the “:” in your branch that makes the pipeline fails. During my test, I created a branch directly on BitBucketCloud with the name “PROJECT_NAME:bugfix/fix_code”, and BBC removed the “:”.
Can you try without the “:” ?
Hi @aurelie,
Thanks,
BRANCH_NAME is “bugfix/fixcode”
jenkins merge project name and branch_name as PROJECT_NAME:BRANCH_NAME so I have created a branch without / and it is working.
Maybe it is about sonarscanner/sonarqube versions. sonarqube server 7.7.0.23042 and sonarqube scanner 3.3.0.1492
We are using server versions of all applications.
I realized I did not understand the problem. I thought it was related to BitBuckectCloud and BitBucketPipelines because you posted under the topic related to them.
Anyway, I’ve moved your topic to SonarQube, and the scanner does not accept the “/” character indeed.
If you still have issues and if you need help, I invite you to detail how you configure your analyses on Jenkins so we can help further.
Sorry for wrong topic.
I have seen " Slash in branch name in PR causing an error in a BitBucket pipeline" title and replied under it. And Yes, it is the problem indeed which I met.
Branch name with slashes is not accepted by sonarscanner and sonarqube but bitbucket’s default naming model has template like “feature/…” or “bugfix/…” etc. So I think problem is not about jenkins. It is about sonarscanner and sonarqube