From 0df5b004e9ead5226c8e9df162227f41f190d00c Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sat, 15 Feb 2025 23:54:34 +0100 Subject: [PATCH 01/28] :cop: Integrated sonar cloud --- .github/workflows/build.yml | 42 ------- .github/workflows/build_test_analyze.yml | 59 ++++++++++ .gitignore | 6 + .../build_test_analyse.cake | 107 ++++++++++++++++++ .../cakeScripts/sonar_analysis.cake | 85 ++++++++++++++ README.md | 13 ++- 6 files changed, 269 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/build_test_analyze.yml create mode 100644 NETCore.Keycloak.Client.Tests/build_test_analyse.cake create mode 100644 NETCore.Keycloak.Client.Tests/cakeScripts/sonar_analysis.cake diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0fa400e..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Build -on: - pull_request: - branches: - - master - types: - - opened - - reopened - - edited - - synchronize - -jobs: - # Build source code - build: - runs-on: ubuntu-latest - strategy: - matrix: - dotnet-version: [8.0.x] - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - # Setup .NET SDK - - name: Set up .NET SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - # Setup cake tool - - name: Setup cake tool - run: | - dotnet tool install --global Cake.Tool - - # Build the project - - name: Build project - if: success() - run: | - # Copy Licence - cp LICENSE NETCore.Keycloak.Client/ - - # Build project - dotnet cake build.cake --target=build diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml new file mode 100644 index 0000000..cb40590 --- /dev/null +++ b/.github/workflows/build_test_analyze.yml @@ -0,0 +1,59 @@ +name: Build test and analyze +on: + push: + branches: + - master + pull_request: + branches: + - master + types: + - opened + - reopened + - edited + - synchronize + +jobs: + # Build test and analyze source code + build_test_analyze: + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [8.0.x] + java-version: [ 21 ] + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + # Setup .NET SDK + - name: Set up .NET SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + # Setup OpenJDK + - name: Setup OpenJDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: ${{ matrix.java-version }} + + # Install dependencies + - name: Install dependencies + run: | + sudo apt install -y make python3-pip + dotnet tool install --global dotnet-sonarscanner + dotnet tool install --global Cake.Tool + dotnet tool install --global JetBrains.dotCover.GlobalTool + + # Build test and analyze the project + - name: Build test and analyze the project + if: success() + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + # Copy Licence + cp LICENSE NETCore.Keycloak.Client/ + + # Build, test and analyze project with keycloak version 20 + cd NETCore.Keycloak.Client.Tests + dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} diff --git a/.gitignore b/.gitignore index 0adf607..497d924 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,8 @@ out **/containers/** **/Assets/*.json +**/NETCore.Keycloak.Client/LICENSE + private.pem location_db.bin @@ -99,6 +101,9 @@ project.lock.json project.fragment.lock.json artifacts/ +# SonarQube +**/.sonarqube + # StyleCop StyleCopReport.xml @@ -173,6 +178,7 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover +**/dotCover* # AxoCover is a Code Coverage Tool .axoCover/* diff --git a/NETCore.Keycloak.Client.Tests/build_test_analyse.cake b/NETCore.Keycloak.Client.Tests/build_test_analyse.cake new file mode 100644 index 0000000..a8bac37 --- /dev/null +++ b/NETCore.Keycloak.Client.Tests/build_test_analyse.cake @@ -0,0 +1,107 @@ +/// +/// Main Cake build script to manage the build, restore, test, and setup of the Keycloak testing environment. +/// Includes and calls tasks from external scripts. +/// + +// Load external task scripts +#load "cakeScripts/check_tools.cake"; +#load "cakeScripts/setup_keycloak_test_environment.cake"; +#load "cakeScripts/sonar_analysis.cake"; +#load "../build.cake"; + +// Update the solution context +slnContext = ".."; + +/// +/// Executes unit tests using JetBrains dotCover for code coverage analysis. +/// Runs the tests without rebuilding the project. +/// +Task("Test") + .IsDependentOn("Build") + .Does(() => + { + Information("Running tests with dotCover..."); + + // Ensure dotnet is installed + var dotnetPath = Context.Tools.Resolve("dotnet"); + if (dotnetPath == null) + { + Error("dotnet is not installed or cannot be found."); + Environment.Exit(255); + } + + // Define the test command + var testCommand = $"dotcover test {slnContext}/NETCore.Keycloak.sln --configuration {configuration} -l:\"console;verbosity=normal\" --no-restore --no-build --dcReportType=HTML"; + + // Configure dotCover settings + var processSettings = new ProcessSettings + { + Arguments = new ProcessArgumentBuilder() + .Append(testCommand), + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + // Run tests with dotCover + var result = StartProcess(dotnetPath, processSettings, out var output, out var error); + + // Evaluate the result of the process execution + if (result != 0) + { + Error("Unit tests failed with dotCover. Error:\n{0}", string.Join(Environment.NewLine, error)); + Environment.Exit(255); + } + + Information("Unit tests executed successfully with dotCover."); + }); + + +/// +/// The BuildTestAnalyse task orchestrates the setup, testing, and analysis of the Keycloak client. +/// It ensures that the environment is correctly configured, executes end-to-end tests, +/// and performs SonarQube analysis while validating required parameters. +/// +Task("BuildTestAnalyse") + .Does(() => + { + Information("Executing Keycloak client build, test, and analysis..."); + + // Generate a list of supported Keycloak versions from 20 to 26 + var versions = Enumerable.Range(20, 26 - 20 + 1).ToList(); + + // Get the major version argument if provided + var kcMajorVersion = Argument("kc_major_version", null); + + // Validate the provided version + if (!kcMajorVersion.HasValue || !versions.Contains(kcMajorVersion.Value)) + { + Error($"Invalid Keycloak version: {kcMajorVersion}. Supported versions: {string.Join(", ", versions)}"); + Environment.Exit(255); + } + + // Retrieve the Sonar token from the arguments + var sonarToken = Argument("sonar_token", null); + + if (string.IsNullOrWhiteSpace(sonarToken)) + { + // Ensure the Sonar token is provided before proceeding + Error("Sonar token is required."); + Environment.Exit(255); + } + + // Log the processing of the specific Keycloak version + Information($"Processing Keycloak Version: {kcMajorVersion.Value}"); + + // Set environment variables for Keycloak and SonarQube + Environment.SetEnvironmentVariable("KC_TEST_VERSION", $"prepare_keycloak_{kcMajorVersion.Value}_environment"); + Environment.SetEnvironmentVariable("KC_SONAR_TOKEN", sonarToken); + + // Execute the required setup, testing, and analysis tasks + RunTarget("Setup-Testing-Environment"); + RunTarget("SonarBegin"); + RunTarget("Test"); + RunTarget("SonarEnd"); + }); + +// Execute the BuildTestAnalyse task +RunTarget("BuildTestAnalyse"); diff --git a/NETCore.Keycloak.Client.Tests/cakeScripts/sonar_analysis.cake b/NETCore.Keycloak.Client.Tests/cakeScripts/sonar_analysis.cake new file mode 100644 index 0000000..c550719 --- /dev/null +++ b/NETCore.Keycloak.Client.Tests/cakeScripts/sonar_analysis.cake @@ -0,0 +1,85 @@ +/// +/// Initiates SonarCloud analysis by executing the `dotnet sonarscanner begin` command. +/// This task resolves the `dotnet` executable, ensures the required Sonar token is provided, +/// and configures the necessary SonarCloud parameters for project analysis. +/// +Task("SonarBegin") + .Does(() => + { + // Retrieve the Sonar token from the environment variable + var sonarToken = Environment.GetEnvironmentVariable("KC_SONAR_TOKEN") ?? ""; + + if (string.IsNullOrWhiteSpace(sonarToken)) + { + // Ensure the token is provided before proceeding + Error("Sonar token is required."); + Environment.Exit(255); + } + + // Resolve the path to the `dotnet` executable + FilePath dotnetPath = Context.Tools.Resolve("dotnet"); + + // Configure process settings for executing the SonarScanner command + var processSettings = new ProcessSettings + { + Arguments = new ProcessArgumentBuilder() + .Append("sonarscanner begin") + .Append($"/d:sonar.token={sonarToken}") + .Append("/k:Black-Cockpit_NETCore.Keycloak") + .Append("/o:black-cockpit") + .Append("/d:sonar.host.url=\"https://sonarcloud.io\"") + .Append("/d:sonar.coverage.exclusions=\"**/NETCore.Keycloak.Client.Tests/**/*.*\"") + .Append("/d:sonar.test.exclusions=\"**/NETCore.Keycloak.Client.Tests/**/*.*\"") + .Append("/d:sonar.exclusions=\"**/NETCore.Keycloak.Client.Tests/**/*.*\"") + .Append("/d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html"), + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + // Execute the SonarScanner command + StartProcess(dotnetPath, processSettings); + }); + +/// +/// Finalizes the SonarCloud analysis by executing the `dotnet sonarscanner end` command. +/// This task ensures the required Sonar token is provided, resolves the `dotnet` executable, +/// and captures the process output and error streams for evaluation. +/// +Task("SonarEnd") + .IsDependentOn("Build") + .Does(() => + { + // Retrieve the Sonar token from the environment variable + var sonarToken = Environment.GetEnvironmentVariable("KC_SONAR_TOKEN") ?? ""; + + if (string.IsNullOrWhiteSpace(sonarToken)) + { + // Ensure the token is provided before proceeding + Error("Sonar token is required."); + Environment.Exit(255); + } + + // Resolve the path to the `dotnet` executable + FilePath dotnetPath = Context.Tools.Resolve("dotnet"); + + // Configure process settings for executing the SonarScanner command + var processSettings = new ProcessSettings + { + Arguments = new ProcessArgumentBuilder() + .Append("sonarscanner end") + .Append($"/d:sonar.token={sonarToken}"), + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + // Execute the SonarScanner command and capture output/error streams + var result = StartProcess(dotnetPath, processSettings, out var output, out var error); + + // Evaluate the result of the process execution + if (result != 0) + { + // Log the error message and exit if the command failed + Error("Sonar analysis finalization failed. Error:\n{0}", string.Join(Environment.NewLine, error)); + Environment.Exit(255); + } + }); diff --git a/README.md b/README.md index 5d38c33..62c380a 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,23 @@
-[![GitHub Build Status](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build.yml/badge.svg)](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build.yml) +[![GitHub Build Status](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build_test_analyze.yml/badge.svg)](https://github.com/Black-Cockpit/NETCore.Keycloak/actions/workflows/build.yml) [![NuGet version](https://img.shields.io/nuget/v/Keycloak.NETCore.Client.svg)](https://www.nuget.org/packages/Keycloak.NETCore.Client/) [![NuGet downloads](https://img.shields.io/nuget/dt/Keycloak.NETCore.Client.svg)](https://www.nuget.org/packages/Keycloak.NETCore.Client/) [![GitHub Stars](https://img.shields.io/github/stars/Black-Cockpit/NETCore.Keycloak)](https://github.com/Black-Cockpit/NETCore.Keycloak/stargazers) [![CodeFactor](https://www.codefactor.io/repository/github/black-cockpit/netcore.keycloak/badge)](https://www.codefactor.io/repository/github/black-cockpit/netcore.keycloak) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FBlack-Cockpit%2FNETCore.Keycloak.svg?type=shield&issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2FBlack-Cockpit%2FNETCore.Keycloak?ref=badge_shield&issueType=security) +[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) +[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Black-Cockpit_NETCore.Keycloak&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Black-Cockpit_NETCore.Keycloak) [![License](https://img.shields.io/github/license/Black-Cockpit/NETCore.Keycloak)](LICENSE) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FBlack-Cockpit%2FNETCore.Keycloak.svg?type=shield&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2FBlack-Cockpit%2FNETCore.Keycloak?ref=badge_shield&issueType=license) From be92ad5d9d15319da269c2f181dffe810c0ce465 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sat, 15 Feb 2025 23:58:24 +0100 Subject: [PATCH 02/28] :white_check_mark: Updated python command on make file --- NETCore.Keycloak.Client.Tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NETCore.Keycloak.Client.Tests/Makefile b/NETCore.Keycloak.Client.Tests/Makefile index 3e05d0b..692ce80 100644 --- a/NETCore.Keycloak.Client.Tests/Makefile +++ b/NETCore.Keycloak.Client.Tests/Makefile @@ -37,7 +37,7 @@ install_virtual_env: fi @echo "Creating directory ${CONF_DIR_CONTEXT}/${VIRTUAL_ENV_DIR}" # Create a new virtual environment - @python3.9 -m venv ${CONF_DIR_CONTEXT}/${VIRTUAL_ENV_DIR} + @python3 -m venv ${CONF_DIR_CONTEXT}/${VIRTUAL_ENV_DIR} # Activate the virtual environment and install dependencies @pushd ${CONF_DIR_CONTEXT}/ && source ${VIRTUAL_ENV_DIR}/bin/activate && pip install -r requirements.txt # Install required Ansible collections From bbd24674205f32506d92376c3346c105cf5f4d6b Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:00:38 +0100 Subject: [PATCH 03/28] :100: Fixed requirements.txt file name --- .../{requirments.txt => requirements.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename NETCore.Keycloak.Client.Tests/{requirments.txt => requirements.txt} (100%) diff --git a/NETCore.Keycloak.Client.Tests/requirments.txt b/NETCore.Keycloak.Client.Tests/requirements.txt similarity index 100% rename from NETCore.Keycloak.Client.Tests/requirments.txt rename to NETCore.Keycloak.Client.Tests/requirements.txt From 80b22596a72708854f0ce39d269ea67ed0916028 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:09:05 +0100 Subject: [PATCH 04/28] :bulb: Added ubuntu python dependencies --- .github/workflows/build_test_analyze.yml | 2 +- .../requirements.txt.ubuntu | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index cb40590..c6bfc09 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -55,5 +55,5 @@ jobs: cp LICENSE NETCore.Keycloak.Client/ # Build, test and analyze project with keycloak version 20 - cd NETCore.Keycloak.Client.Tests + cd NETCore.Keycloak.Client.Tests && cp requirements.txt.ubuntu requirements.txt dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} diff --git a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu new file mode 100644 index 0000000..22474f6 --- /dev/null +++ b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu @@ -0,0 +1,14 @@ +ansible==8.7.0 +ansible-core==2.15.13 +cffi==1.17.1 +cryptography==44.0.0 +importlib-resources==5.0.7 +Jinja2==3.1.5 +MarkupSafe==3.0.2 +packaging==24.2 +pycparser==2.22 +python-keycloak==3.3.0 +PyYAML==6.0.2 +requests==2.32.3 +requests-toolbelt==1.0.0 +resolvelib==1.0.1 \ No newline at end of file From 2d206c553ea5ddf5a0ee43a9f1e75146b75d2996 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:12:40 +0100 Subject: [PATCH 05/28] :bulb: Downgraded ansible core library from 2.15.13 to 2.15.12 --- NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu index 22474f6..8921d59 100644 --- a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu +++ b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu @@ -1,5 +1,5 @@ ansible==8.7.0 -ansible-core==2.15.13 +ansible-core==2.15.12 cffi==1.17.1 cryptography==44.0.0 importlib-resources==5.0.7 From bc2a13fe2fe8e7a08d607548bbed8b35d6e3c873 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:16:43 +0100 Subject: [PATCH 06/28] :bulb: Downgraded ansible dependencies --- .../requirements.txt.ubuntu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu index 8921d59..3333f81 100644 --- a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu +++ b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu @@ -1,14 +1,14 @@ ansible==8.7.0 ansible-core==2.15.12 -cffi==1.17.1 -cryptography==44.0.0 +cffi==1.16.0 +cryptography==43.0.1 importlib-resources==5.0.7 -Jinja2==3.1.5 -MarkupSafe==3.0.2 -packaging==24.2 +jinja2==3.1.4 +MarkupSafe==2.1.5 +packaging==24.0 pycparser==2.22 +PyYAML==6.0.1 python-keycloak==3.3.0 -PyYAML==6.0.2 requests==2.32.3 requests-toolbelt==1.0.0 resolvelib==1.0.1 \ No newline at end of file From 73592f6817391334d97a19e909fb4e24698e3294 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:20:19 +0100 Subject: [PATCH 07/28] :100: Fixed ansible.cfg --- .github/workflows/build_test_analyze.yml | 2 +- NETCore.Keycloak.Client.Tests/ansible.cfg | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index c6bfc09..42c2ec5 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -55,5 +55,5 @@ jobs: cp LICENSE NETCore.Keycloak.Client/ # Build, test and analyze project with keycloak version 20 - cd NETCore.Keycloak.Client.Tests && cp requirements.txt.ubuntu requirements.txt + cd NETCore.Keycloak.Client.Tests dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} diff --git a/NETCore.Keycloak.Client.Tests/ansible.cfg b/NETCore.Keycloak.Client.Tests/ansible.cfg index 0543176..36a3fb9 100644 --- a/NETCore.Keycloak.Client.Tests/ansible.cfg +++ b/NETCore.Keycloak.Client.Tests/ansible.cfg @@ -5,8 +5,6 @@ host_key_checking = False executable = /bin/bash allow_world_readable_tmpfiles = True callbacks_enabled = profile_tasks, profile_roles -stdout_callback = yaml -stderr_callback = yaml forks=50 ssh_args = -o ControlMaster=auto -o ControlPersist=60s pipelining = True From edf4965cf3061b56460cb42a3286bd92f40de0d6 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:23:57 +0100 Subject: [PATCH 08/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 42c2ec5..c64d408 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,7 +40,7 @@ jobs: # Install dependencies - name: Install dependencies run: | - sudo apt install -y make python3-pip + sudo apt install -y make python3-pip python3-rpm dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool dotnet tool install --global JetBrains.dotCover.GlobalTool From b721f110ad843a632b73473d806cf65e93bbf3b8 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:27:50 +0100 Subject: [PATCH 09/28] :gear: Debugging build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index c64d408..0e94e47 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -56,4 +56,5 @@ jobs: # Build, test and analyze project with keycloak version 20 cd NETCore.Keycloak.Client.Tests - dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} + make prepare_keycloak_21_environment + #dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} From 65526644489f146a18aaa5af7fce418d4a9f4c34 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:31:44 +0100 Subject: [PATCH 10/28] :gear: Debugging build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 0e94e47..fe88e36 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,7 +40,7 @@ jobs: # Install dependencies - name: Install dependencies run: | - sudo apt install -y make python3-pip python3-rpm + sudo apt install -y make python3-pip python3-rpm python3-psycopg2 dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool dotnet tool install --global JetBrains.dotCover.GlobalTool From 7863e7f32312932c24930cd00f7c9fac67c4be2c Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:35:45 +0100 Subject: [PATCH 11/28] :gear: Debugging build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index fe88e36..1b71e01 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -41,6 +41,7 @@ jobs: - name: Install dependencies run: | sudo apt install -y make python3-pip python3-rpm python3-psycopg2 + pip3 install python-keycloak==3.3.0 --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool dotnet tool install --global JetBrains.dotCover.GlobalTool From 1c825541be315536ce40183dc2656aee8664513d Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:43:53 +0100 Subject: [PATCH 12/28] :gear: Debugging build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 1b71e01..85a33e1 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -41,7 +41,7 @@ jobs: - name: Install dependencies run: | sudo apt install -y make python3-pip python3-rpm python3-psycopg2 - pip3 install python-keycloak==3.3.0 --user + pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool dotnet tool install --global JetBrains.dotCover.GlobalTool From 957e21aedc744145a6685b597c965aa9edd58747 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:46:56 +0100 Subject: [PATCH 13/28] :gear: Debugging build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 85a33e1..1e7e7ac 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -15,7 +15,7 @@ on: jobs: # Build test and analyze source code build_test_analyze: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: dotnet-version: [8.0.x] From f13afa3741e7aa6d960bda4fe8b2a033ee50e148 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:49:57 +0100 Subject: [PATCH 14/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 3 +-- .../requirements.txt.ubuntu | 14 -------------- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 1e7e7ac..602d03e 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -57,5 +57,4 @@ jobs: # Build, test and analyze project with keycloak version 20 cd NETCore.Keycloak.Client.Tests - make prepare_keycloak_21_environment - #dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} + dotnet cake build_test_analyse.cake --kc_major_version=20 --sonar_token=${SONAR_TOKEN} diff --git a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu b/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu deleted file mode 100644 index 3333f81..0000000 --- a/NETCore.Keycloak.Client.Tests/requirements.txt.ubuntu +++ /dev/null @@ -1,14 +0,0 @@ -ansible==8.7.0 -ansible-core==2.15.12 -cffi==1.16.0 -cryptography==43.0.1 -importlib-resources==5.0.7 -jinja2==3.1.4 -MarkupSafe==2.1.5 -packaging==24.0 -pycparser==2.22 -PyYAML==6.0.1 -python-keycloak==3.3.0 -requests==2.32.3 -requests-toolbelt==1.0.0 -resolvelib==1.0.1 \ No newline at end of file From 58fab85aba307b73d400bfab4442b0d4da7a8c83 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:56:23 +0100 Subject: [PATCH 15/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 602d03e..196b4e3 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,7 +40,7 @@ jobs: # Install dependencies - name: Install dependencies run: | - sudo apt install -y make python3-pip python3-rpm python3-psycopg2 + sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool From a0fb6ca7091ff5eb2ae558ceb79f74ad15cb3f49 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 00:57:48 +0100 Subject: [PATCH 16/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 196b4e3..1f01cba 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,6 +40,8 @@ jobs: # Install dependencies - name: Install dependencies run: | + wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb + sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner From 18bf296511496c9ab350f78455e52246512f7b33 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:00:13 +0100 Subject: [PATCH 17/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 1f01cba..7dc576f 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,6 +40,7 @@ jobs: # Install dependencies - name: Install dependencies run: | + sudo apt remove -y --purge dotnet-sdk-6* dotnet-sdk-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 From 822c9364706bbca8a05ac76886684a6f49285ec4 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:02:17 +0100 Subject: [PATCH 18/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 7dc576f..19d1bd0 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,7 +40,7 @@ jobs: # Install dependencies - name: Install dependencies run: | - sudo apt remove -y --purge dotnet-sdk-6* dotnet-sdk-7* + sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-host-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 From 271e3b17ba295120bdae84cc969d5ec240457e95 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:03:34 +0100 Subject: [PATCH 19/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 19d1bd0..77d6652 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -40,9 +40,9 @@ jobs: # Install dependencies - name: Install dependencies run: | - sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-host-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* + sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb - sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update + sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner From ee28ee6b706f96aa97b780b60f448225a67c58cb Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:05:42 +0100 Subject: [PATCH 20/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 77d6652..1f7c156 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -43,7 +43,8 @@ jobs: sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update - sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 + sudo apt install -y dotnet-host-7.0 + sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool From 8d22b5450b5355fdc7bb85efea7235755fcf1f68 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:14:18 +0100 Subject: [PATCH 21/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 1f7c156..8ed94c2 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -48,7 +48,7 @@ jobs: pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool - dotnet tool install --global JetBrains.dotCover.GlobalTool + dotnet tool install --global JetBrains.dotCover.GlobalTool --version 2022.1.2 # Build test and analyze the project - name: Build test and analyze the project From cb1b3cab3a9d13d8665b026a84c84670f4ee2046 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:25:26 +0100 Subject: [PATCH 22/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 8ed94c2..62a60a9 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - dotnet-version: [8.0.x] + dotnet-version: [6.0.x, 7.0.x, 8.0.x] java-version: [ 21 ] steps: - name: Checkout Repository From ad27a0b90007cb2943bb02d3c47efe04c2ce888e Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:31:05 +0100 Subject: [PATCH 23/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 62a60a9..d1be197 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -18,17 +18,10 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - dotnet-version: [6.0.x, 7.0.x, 8.0.x] java-version: [ 21 ] steps: - name: Checkout Repository uses: actions/checkout@v4 - - # Setup .NET SDK - - name: Set up .NET SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet-version }} # Setup OpenJDK - name: Setup OpenJDK @@ -44,7 +37,7 @@ jobs: wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update sudo apt install -y dotnet-host-7.0 - sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 python3-pip python3-rpm python3-psycopg2 + sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool From e6d463cf3ef88e0b62ed16f2b997bbe3938d70be Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:33:17 +0100 Subject: [PATCH 24/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index d1be197..c24c257 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -36,6 +36,7 @@ jobs: sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update + sudo apt install -y dotnet-hostfxr-7.0 sudo apt install -y dotnet-host-7.0 sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user From fd26e126ec68ed784c67e2872551e8a57e0c7024 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:34:44 +0100 Subject: [PATCH 25/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index c24c257..3d492ce 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -36,8 +36,8 @@ jobs: sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update - sudo apt install -y dotnet-hostfxr-7.0 sudo apt install -y dotnet-host-7.0 + sudo apt install -y dotnet-hostfxr-7.0 sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner From 478ca4b472963704ad15862047a4ebbba17411d6 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi Date: Sun, 16 Feb 2025 01:36:26 +0100 Subject: [PATCH 26/28] :100: Fixed build and analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 3d492ce..1874b12 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -36,8 +36,6 @@ jobs: sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update - sudo apt install -y dotnet-host-7.0 - sudo apt install -y dotnet-hostfxr-7.0 sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner From dc3a5edc85ad1b5ce939088fd02c6f5d311ec646 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi <50323226+hasnimehdi91@users.noreply.github.com> Date: Sun, 16 Feb 2025 04:16:04 +0300 Subject: [PATCH 27/28] :alien: Updated build test and analyze pipeline --- .github/workflows/build_test_analyze.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 1874b12..7154bea 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -29,18 +29,24 @@ jobs: with: distribution: 'adopt' java-version: ${{ matrix.java-version }} + + # Install all required .NET SDK versions + - name: Install .NET SDKs (6.0, 7.0, 8.0) + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 6.0.x + 7.0.x + 8.0.x # Install dependencies - name: Install dependencies run: | - sudo apt remove -y --purge dotnet-sdk-6* dotnet-hostfxr-6* dotnet-sdk-7* dotnet-hostfxr-7* dotnet-host-7* - wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb - sudo apt-get autoremove -y && sudo apt-get autoclean && sudo dpkg -i packages-microsoft-prod.deb && sudo apt-get update - sudo apt install -y make dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 python3-pip python3-rpm python3-psycopg2 + sudo apt install -y make python3-pip python3-rpm python3-psycopg2 pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool - dotnet tool install --global JetBrains.dotCover.GlobalTool --version 2022.1.2 + dotnet tool install --global JetBrains.dotCover.GlobalTool --version # Build test and analyze the project - name: Build test and analyze the project From 2c936bd0b2abf1ae7d6c95d6abb4eaacfca034a8 Mon Sep 17 00:00:00 2001 From: Hasni Mehdi <50323226+hasnimehdi91@users.noreply.github.com> Date: Sun, 16 Feb 2025 04:19:14 +0300 Subject: [PATCH 28/28] :100: Fixed build test analyze pipeline --- .github/workflows/build_test_analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_analyze.yml b/.github/workflows/build_test_analyze.yml index 7154bea..cef08a5 100644 --- a/.github/workflows/build_test_analyze.yml +++ b/.github/workflows/build_test_analyze.yml @@ -46,7 +46,7 @@ jobs: pip install 'python-keycloak==3.3.0' --user dotnet tool install --global dotnet-sonarscanner dotnet tool install --global Cake.Tool - dotnet tool install --global JetBrains.dotCover.GlobalTool --version + dotnet tool install --global JetBrains.dotCover.GlobalTool # Build test and analyze the project - name: Build test and analyze the project