Hi, I have SQ 7.5 Develop Edition.
I’m trying to set a standard for versioning Sonar projects in my organization.
The objective is to definitively identify which version of the code was analyzed and to indicate to Sonar at each analysis that the code has changed.
Initially the idea was to use the git commit hash as the version identifier for each project - setting sonar.projectVersion =% CI_COMMIT_SHA% during the pipeline in gitlab.
In addition, after to implement a release we define the leak period as the commit hash that points to the commit of the release. In this way, Sonar’s analysis before deployment will show all the code that has changed during development.
As an example, for our internal project, we defined the leak period as 0e5c85b4dc2f9ba4419a8e83395599a3811cef98, which is the commit of the last version deployed.
This was working fine until on may/27 the analysis began to display the following error message:
Invalid new code period. ‘0e5c85b4dc2f9ba4419a8e83395599a3811cef98’ is not one of: integer> 0, date before current analysis j, \ "previous_version ", or version string that exists in the project '\ n Please contact the project administrator to correct this setting
However, the string, 0e5c85b4dc2f9ba4419a8e83395599a3811cef98 satisfies all the criteria requested in the message, as well as an existing version string in the project.
We temporarily changed the leak period to the above commit date - may/13, but this is not a 100% solution because it prevents more than one release commit on the same date.
I need help and support from how to proceed:
From Sonarqube documentation this is a supported scenario and I did not understand the cause of the error.