diff --git a/migration/README.md b/migration/README.md index d97b58cf6..5a44d748f 100644 --- a/migration/README.md +++ b/migration/README.md @@ -112,6 +112,7 @@ When sonar-migration complete successfully they return exit code 0. En case of f - Robustness: Handle `connectionError` errors in project extract threads - Added option `--skipIssues` to skip expensive issue count extraction task from the extract which may be necessary on large platforms extracts +- Added export of analysis history ## Version 0.2 @@ -140,18 +141,18 @@ When sonar-migration complete successfully they return exit code 0. En case of f - Last background task scanner context and warnings - Background Task history - Issues: - - # of issue False positive - - # of issues Won’t fix - - # of issues Accepted - - # of issues generated by 3rd party rules (with breakdown per rule) + - Nbr of issue False positive + - Nbr of issues Won’t fix + - Nbr of issues Accepted + - Nbr of issues generated by 3rd party rules (with breakdown per rule) - For each branch: - Last analysis date - Ncloc w/ breakdown by language - Issues - - # of issue False positive - - # of issues Won’t fix - - # of issues Accepted - - # of issues generated by 3rd party rules (with breakdown per rule) + - Nbr of issue False positive + - Nbr of issues Won’t fix + - Nbr of issues Accepted + - Nbr of issues generated by 3rd party rules (with breakdown per rule) # License diff --git a/migration/deploy.sh b/migration/deploy.sh index 278bf1be5..8f82a635c 100755 --- a/migration/deploy.sh +++ b/migration/deploy.sh @@ -60,5 +60,5 @@ if [ "$release" = "1" ]; then fi if [ "$release_docker" = "1" ]; then - docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.2 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile . + docker buildx build --push --platform linux/amd64,linux/arm64 -t olivierkorach/sonar-migration:0.3 -t olivierkorach/sonar-migration:latest -f migration/release.Dockerfile . fi \ No newline at end of file diff --git a/migration/release.Dockerfile b/migration/release.Dockerfile index 0a9e1bbe6..02ca65ab9 100644 --- a/migration/release.Dockerfile +++ b/migration/release.Dockerfile @@ -31,7 +31,7 @@ COPY ./LICENSE . COPY ./sonar/audit sonar/audit RUN pip install --upgrade pip \ -&& pip install sonar-migration==0.2 --force-reinstall +&& pip install sonar-migration==0.3 --force-reinstall USER ${USERNAME} WORKDIR /home/${USERNAME} diff --git a/migration/sonar_migration b/migration/sonar_migration index 31ab6c220..068b0560c 100755 --- a/migration/sonar_migration +++ b/migration/sonar_migration @@ -28,5 +28,5 @@ sonar-migration version {version.PACKAGE_VERSION} run: sonar-migration -u -t -See tools built-in -h help and https://github.com/okorach/sonar-tools/doc/README.sonar-migration.md for more documentation +See tools built-in -h help and https://github.com/okorach/sonar-tools/migration/README.md for more documentation ''') diff --git a/migration/what-is-new.md b/migration/what-is-new.md index ec9257852..fb553657e 100644 --- a/migration/what-is-new.md +++ b/migration/what-is-new.md @@ -2,7 +2,7 @@ - Robustness: Handle `connectionError` errors in project extract threads - Added option `--skipIssues` to skip expensive issue count extraction task from the extract which may be necessary on large platforms extracts - +- Added export of analysis history # Version 0.2 diff --git a/sonar/components.py b/sonar/components.py index 1112a5936..2295877aa 100644 --- a/sonar/components.py +++ b/sonar/components.py @@ -178,6 +178,7 @@ def migration_export(self, export_settings: types.ConfigSettings) -> dict[str, a loc_distrib = {m.split("=")[0]: int(m.split("=")[1]) for m in lang_distrib.split(";")} loc_distrib["total"] = self.loc() json_data["ncloc"] = loc_distrib + json_data["analysisHistory"] = {r[0]: int(r[2]) for r in self.get_measures_history(["ncloc"])} if export_settings["SKIP_ISSUES"]: log.debug("Issues count extract skipped for %s`", str(self)) return json_data @@ -198,6 +199,7 @@ def migration_export(self, export_settings: types.ConfigSettings) -> dict[str, a "fixed": hotspot_count(self.endpoint, resolution=["FIXED"], **params), } log.debug("%s has these notable issues %s", str(self), str(json_data["issues"])) + return json_data def get_measures(self, metrics_list: types.KeyList) -> dict[str, any]: