Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(sonar-test-scan.yml): update Maven commands in Sonar test scan workflow - Change the Maven command from "mvn -B verify -P '!run-proguard' -DskipITs -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT" to "mvn -B package -P 'sonar,!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT" to only package the project and exclude running tests. - Update the Maven command in the "run" step from "mvn -B verify sonar:sonar -P '!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT" to "mvn -B sonar:sonar -P 'sonar,!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT" to only run Sonar analysis and exclude running tests. These changes improve the efficiency of the Sonar test scan workflow by skipping unnecessary steps and focusing on the required tasks. * fix(sonar-test-scan.yml): remove unnecessary argument '--classfiles' from jacococli.jar command The '--classfiles' argument is not needed in the jacococli.jar command as it is already configured to use the correct class files directory. Removing this argument improves the clarity and simplicity of the command. * chore(sonar-test-scan.yml): generate dump classes during the Sonar test scan to improve code coverage accuracy chore(sonar-test-scan.yml): update jacococli.jar command to include classfiles path for code coverage report generation * chore(sonar-test-scan.yml): add lt -ltr command to list files in the target directory after jacoco report generation * refactor(sonar-test-scan.yml): improve file path handling for jacoco.exec files feat(sonar-test-scan.yml): add support for dynamic module name for jacoco.exec file paths * fix(sonar-test-scan.yml): update jacococli.jar path to match the location of the tested classes module * chore(sonar-test-scan.yml): remove unnecessary mkdir command to improve build process efficiency chore(sonar-test-scan.yml): add ls commands to debug build process and check file structure before and after jacoco merge * chore(sonar-test-scan.yml): update jacoco unzip command to use quiet mode for less verbose output chore(sonar-test-scan.yml): remove unnecessary 'lt' command from jacoco report step * chore(sonar-test-scan.yml): remove unnecessary ls commands to improve readability and reduce noise in the workflow chore(sonar-test-scan.yml): update jacoco version to v0.8.10 to ensure compatibility with the latest release chore(sonar-test-scan.yml): update jacoco file paths to match the new jacoco version and project structure * chore(sonar-test-scan.yml): add command to list files in the target directory for debugging purposes * chore(sonar-test-scan.yml): add working directory configuration to Sonar test scan jobs The working directory configuration is added to the Sonar test scan jobs in the `.github/workflows/sonar-test-scan.yml` file. This allows the jobs to run in the specified directory, which is determined by the `testedClassesModuleName` input. * chore(create-release.yml): update sonar-push.yml version to v0.4.4 for better compatibility and bug fixes chore(extension-attach-artifact-release.yml): update get_draft_release.sh, sign_artifact.sh, and upload_asset.sh versions to v0.4.4 for better compatibility and bug fixes chore(extension-release-published.yml): update extension-release-prepare.yml version to v0.4.4 for better compatibility and bug fixes chore(os-extension-test.yml): update sonar-pull-request.yml version to v0.4.4 for better compatibility and bug fixes chore(package-deb.yml): update package-deb-pom.xml and related scripts versions to v0.4.4 for better compatibility and bug fixes chore(pom-release-published.yml): update extension-release-prepare.yml version to v0.4.4 for better compatibility and bug fixes chore(pro-extension-test.yml): update sonar-pull-request.yml version to v0.4.4 for better compatibility and bug fixes chore(sonar-test-scan.yml): remove unnecessary ls command and improve code readability * fix(sonar-test-scan.yml): skip running tests during the build process to improve build time and avoid unnecessary test execution * chore(sonar-test-scan.yml): remove unnecessary jacoco download and extraction steps chore(sonar-test-scan.yml): remove unnecessary jacoco cli execution step * chore(sonar-test-scan.yml): remove unnecessary step to generate dump classes The step to generate dump classes was removed as it is no longer needed in the workflow. * chore(sonar-test-scan.yml): add step to generate dump classes during the workflow The `Generate dump classes` step was added to the workflow. This step runs the command `mvn -B clean install -DskipTests -P 'sonar,!run-proguard' "-Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT"` in the `${{ inputs.testedClassesModuleName }}` directory. This step is necessary to generate dump classes for the SonarQube analysis. * chore(sonar-test-scan.yml): add step to generate Jacoco report after merging results to improve code coverage analysis * chore(sonar-test-scan.yml): rename step name from "Generate dump classes" to "Generate classes" for clarity * chore(sonar-test-scan.yml): add step to save Jacoco reports as an artifact for further analysis * chore(sonar-test-scan.yml): add support for configurable classes artifact name feat(sonar-test-scan.yml): download classes artifact and merge jacoco reports using jacococli.jar The changes in this commit include: - Added a new input parameter `classesArtifactName` to the workflow file `sonar-test-scan.yml` to specify the name of the classes artifact. - Added a new step to download the classes artifact using the `actions/download-artifact` action. - Modified the existing step to merge the jacoco reports to use the `jacococli.jar` tool. - Added new steps to download the `jacococli.jar` tool, move it to the appropriate location, and merge the jacoco reports using the tool. - Added a new step to generate the jacoco report in XML format. These changes were made to improve the SonarQube scan workflow by allowing the use of a configurable classes artifact name and using the `jacococli.jar` tool for merging the jacoco reports. * fix(sonar-test-scan.yml): change jacococli.jar command to use merged.exec instead of aggregate.exec for generating jacoco.xml report * chore(sonar-test-scan.yml): remove unused classesArtifactName input variable to simplify configuration chore(sonar-test-scan.yml): downgrade java-version to 11 to match project requirements chore(sonar-test-scan.yml): remove unnecessary download classes step as it is not used in the workflow chore(sonar-test-scan.yml): update merge integration and unit tests reports step to create target directory if it doesn't exist * chore(sonar-test-scan.yml): remove unused input variables for unitTestReportArtifactName and integrationTestReportArtifactName chore(sonar-test-scan.yml): update artifact names for downloading test reports to match new naming convention * chore(sonar-test-scan.yml): add conditional step to always generate classes during the workflow The conditional step was added to ensure that the classes are always generated during the workflow execution, regardless of the previous steps' outcomes. This is necessary to ensure that the generated classes are up to date and reflect any changes made in the codebase. * fix(sonar-test-scan.yml): fix path for creating directory and moving files to match the input variable fix(sonar-test-scan.yml): fix path for unzipping jacoco-0.8.10.zip and moving jacococli.jar to match the input variable fix(sonar-test-scan.yml): fix path for changing directory to match the input variable * chore(sonar-test-scan.yml): update default value of databasePlatforms input to only include mysql fix(sonar-test-scan.yml): fix working directory for Generate classes and Merge integration and unit tests reports steps fix(sonar-test-scan.yml): fix classfiles path in jacococli.jar report command * refactor(sonar-test-scan.yml): simplify file path and directory structure for jacoco coverage reports feat(sonar-test-scan.yml): add support for merging and generating jacoco coverage reports for different integration test databases * fix(sonar-test-scan.yml): update jacoco report classfiles path to point to the correct directory The classfiles path for generating the jacoco report was pointing to the wrong directory. This commit updates the path to point to the correct directory, `../liquibase-standard/target/`, to ensure that the jacoco report is generated correctly. * chore(sonar-test-scan.yml): add support for custom sonarRootPath and testedClassesModuleName inputs The `sonar-test-scan.yml` workflow file has been modified to include support for two new inputs: `sonarRootPath` and `testedClassesModuleName`. The `sonarRootPath` input allows specifying the root path of the project to be scanned by Sonar. It is an optional input with a default value of `.` (current directory). The `testedClassesModuleName` input allows specifying the name of the module containing the tested classes. It is an optional input with no default value. These changes provide flexibility in configuring the Sonar scan for different project structures and module setups. * chore(sonar-test-scan.yml): remove unnecessary working-directory configuration chore(sonar-test-scan.yml): add working-directory configuration to specify the root path for Sonar scan * chore(sonar-test-scan.yml): remove unnecessary commands and improve Jacoco report generation The following changes were made: - Removed the `pwd` and `ls` commands for debugging purposes - Removed the `Save Jacoco Reports` step as it is no longer needed - Improved the Jacoco report generation by specifying the classfiles and sourcefiles directories - Added a `cat jacoco.xml` command to display the contents of the generated Jacoco report * chore(sonar-test-scan.yml): add debug output to print current working directory and list files in it chore(sonar-test-scan.yml): archive test results by uploading jacoco.xml file as an artifact * chore(sonar-test-scan.yml): remove unnecessary echo statement and add support for generating HTML coverage report The unnecessary echo statement that prints the "Tested classes module name" has been removed to reduce noise in the workflow logs. Support for generating HTML coverage reports has been added. The jacococli.jar command is now executed twice, once to generate the XML report and once to generate the HTML report. The HTML report is generated for both the root module and the specified tested classes module, if provided. The generated HTML reports are then archived as artifacts. * chore(sonar-test-scan.yml): update jacoco report command to generate HTML report in a 'site' directory * chore(sonar-test-scan.yml): add default value 'root' for testedClassesModuleName input parameter fix(sonar-test-scan.yml): fix path to source files in jacococli.jar report command feat(sonar-test-scan.yml): change artifact name to 'liquibase-jacoco-merged-results' for upload-artifact step * chore(sonar-test-scan.yml): remove unused artifact upload step The artifact upload step for archiving Jacoco merged results was removed as it was no longer needed. * chore(sonar-test-scan.yml): set default working directory for sonar-scan job to the specified sonarRootPath input value to ensure correct execution context * chore(sonar-test-scan.yml): add ls -ltr command to debug workflow chore(sonar-test-scan.yml): create target directory if it doesn't exist to prevent mv command failure * chore(sonar-test-scan.yml): update artifact download paths to use dynamic sonarRootPath input variable for better flexibility and maintainability chore(sonar-test-scan.yml): remove unnecessary ls -ltr command in the SonarCloud analysis step * fix(sonar-test-scan.yml): update jacoco report command to use correct classfiles path for root module fix(sonar-test-scan.yml): update jacoco report command to use correct classfiles path for non-root modules
- Loading branch information