Commit 33c8ace3 authored by Christian Ceelen's avatar Christian Ceelen Committed by Pierre Smeyers
Browse files

feat: multi-projects build support

The template now supports working with multiple solutions and projects

BREAKING CHANGE: variables DOTNET_BUILD_DIR and DOTNET_TEST_PROJECT_DIR
removed
parent a8e711d6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -21,3 +21,8 @@
/nbdist/
/.nb-gradle/
.DS_Store
coverage/
src/
tmp/
*.tar.gz
*.zip
+228 −27

File changed.

Preview size limit exceeded, changes collapsed.

+54 −24
Original line number Diff line number Diff line

{
  "name": ".NET",
  "description": "Build, test and analyse your [.NET](https://dotnet.microsoft.com) projects",
@@ -10,53 +9,72 @@
  "variables": [
    {
      "name": "DOTNET_IMAGE",
      "description": "The Docker image used to run the .NET SDK - **set the version required by your project**",
      "default": "mcr.microsoft.com/dotnet/sdk:latest"
    },
    {
      "name": "DOTNET_BUILD_ARGS",
      "description": "Arguments used by the [build](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) job",
      "description": "The Docker base image used to run the .NET SDK *(additional SDKs are installed as needed)* (see [Microsoft Container Registry](https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/tags) for available tags)",
      "default": "mcr.microsoft.com/dotnet/sdk:10.0",
      "advanced": true
    },
    {
      "name": "DOTNET_PROJECT_DIR",
      "description": "The folder where solution (*.sln) or project (*.csproj) file is located",
      "default": ".",
      "description": "The folder where the solution (`*.sln, *.slnx`) or the project (`*.csproj, *.fsproj, *.vbproj`) file to build is located.",
      "default": "."
    },
    {
      "name": "DOTNET_BUILD_FILE",
      "description": "The name of the solution (`*.sln, *.slnx`) or the project (`*.csproj, *.fsproj, *.vbproj`) file to build.\n\n_Leave empty to enable auto-discovery._",
      "advanced": true
    },
    {
      "name": "DOTNET_BUILD_DIR",
      "description": "The relative path to the folder where the built files are located",
      "default": "bin/Debug",
      "name": "DOTNET_BUILD_ARGS",
      "description": "Additional arguments used by the [build](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) job",
      "advanced": true
    },
    {
      "name": "DOTNET_BUILD_PROPS",
      "description": "Space separated list of properties injected into the `Directory.Build.props` or `*.*proj` files by the [build](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) job.\n\n_Formatted as `Property1=Value1 Property2=Value2`._",
      "advanced": true,
      "default": "ErrorLog=bin/dotnet-build.sarif,version=2.1 AnalysisLevel=latest AnalysisMode=all CodeAnalysisIgnoreGeneratedCode=true WarningLevel=4 EnforceCodeStyleInBuild=true RunAnalyzersDuringBuild=true RunCodeAnalysis=true TreatWarningsAsErrors=false CodeAnalysisTreatWarningsAsErrors=false PublishRepositoryUrl=true"
    },
    {
      "name": "DOTNET_NUGET_SOURCES",
      "description": "Space separated list of .Net NuGet package [sources](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source) (formatted as `somename:https://some.nuget.registry/some/repo/index.json anothername:https://another.nuget.registry/another/repo/index.json`)",
      "advanced": true
    },
    {
      "name": "DOTNET_TEST_ENABLED",
      "description": "Set to false to disable tests execution",
      "default": "true",
      "type": "boolean",
      "name": "DOTNET_BUILD_CONFIGURATION",
      "description": "The [build configuration](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) to use (Debug or Release)",
      "default": "Release",
      "advanced": true
    },
    {
      "name": "DOTNET_TEST_PROJECT_DIR",
      "description": "The folder where Unit tests (*.cproj) file is located",
      "default": "."
      "name": "DOTNET_PACKAGE_CONFIGURATION",
      "description": "The build configuration to use for packaging (Debug or Release) a [library](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack) or [executable](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish)",
      "default": "Release",
      "advanced": true
    },
    {
      "name": "DOTNET_TEST_EXTRA_ARGS",
      "description": "Extra arguments used by the [test](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test?tabs=dotnet-test-with-vstest) job",
      "name": "DOTNET_PACKAGE_SYMBOLS_DISABLED",
      "description": "Disable creation of symbol packages (snupkg) for debugging",
      "default": "false",
      "advanced": true
    }
  ],
  "features": [
    {
      "id": "dotnet-sonar",
      "name": "dotnet sonar",
      "id": "test",
      "name": "Test Run",
      "description": "Run tests with [dotnet test](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test)",
      "disable_with": "DOTNET_TEST_DISABLED",
      "variables": [
        {
          "name": "DOTNET_TEST_EXTRA_ARGS",
          "description": "Extra arguments used by the [dotnet test](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test) command",
          "advanced": true
        }
      ]
    },
    {
      "id": "sonar",
      "name": "SonarQube",
      "description": "[Dotnet Sonar](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/dotnet/using) analysis",
      "variables": [
        {
@@ -75,10 +93,22 @@
          "description": "SonarQube authentication token (see https://docs.sonarsource.com/sonarqube-server/user-guide/managing-tokens/) - depends on your authentication method",
          "secret": true
        },
        {
          "name": "SONAR_QUALITY_GATE_ENABLED",
          "description": "Enables SonarQube [Quality Gate](https://docs.sonarsource.com/sonarqube-server/latest/quality-standards-administration/managing-quality-gates/introduction/) verification. _Uses `sonar.qualitygate.wait` parameter ([see doc](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/ci-integration/overview/#quality-gate-fails))._",
          "default": "false",
          "type": "boolean"
        },
        {
          "name": "DOTNET_SONAR_EXTRA_ARGS",
          "description": "Extra arguments used by the [SonarScanner](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/dotnet/using/#analysis-steps)",
          "advanced": true
        },
        {
          "name": "DOTNET_SONAR_EXCLUSIONS",
          "description": "Files and directories to be excluded from analysis, as a comma-separated list of paths. See [documentation](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) for the format.",
          "default": "**/bin/**,**/obj/**,**/packages/**,**/*.g.cs,**/*.g.i.cs,**/*.designer.cs,**/*AssemblyInfo.cs,.sonarqube",
          "advanced": true
        }
      ]
    }
+991 −90

File changed.

Preview size limit exceeded, changes collapsed.