This job creates a Software Bill Of Materials (SBOM) for the project, libraries and executables using [CycloneDX cdxgen](https://github.com/CycloneDX/cdxgen).
**Execution rules:**
- Disabled if `sbom-disabled` is set to `true`
- Runs always if `TBC_SBOM_MODE` is set to `always`
- Runs on release, integration, or production branches when `TBC_SBOM_MODE` is set to `onrelease` (default)
- Skipped in all other cases
| Input / Variable | Description | Default value |
| `sbom-disabled` / `DOTNET_SBOM_DISABLED` | Set to true to disable SBOM generation | `false`|
| `sbom-image` / `DOTNET_SBOM_IMAGE` | The container image to use for SBOM generation using [CycloneDX cdxgen](https://github.com/CycloneDX/cdxgen) | `ghcr.io/cyclonedx/cdxgen:master` |
| `sbom-supplier` / `DOTNET_SBOM_SUPPLIER` | The package supplier name to use in the generated SBOMs | `{CI_PROJECT_NAMESPACE}` |
| `sbom-opts` / `DOTNET_SBOM_OPTS` | Additional options to pass to the SBOM generation tool | `--fail-on-error --evidence --deep` |
description:Set to true to disable the [Dotnet Format](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format) code formatting check (enabled by default)
type:boolean
default:false
sbom-disabled:
description:Set to true to disable SBOM generation
type:boolean
default:false
sbom-supplier:
description:The package supplier name to use in the generated SBOMs
default:'${CI_PROJECT_ROOT_NAMESPACE}'
sbom-image:
description:The container image to use for SBOM generation using [CycloneDX cdxgen](https://github.com/CycloneDX/cdxgen)
default:'ghcr.io/cyclonedx/cdxgen:master'
sbom-opts:
description:Additional options to pass to the SBOM generation tool
default:'--fail-on-error--evidence--deep'
package-configuration:
description:The build configuration to use for packaging (Debug or Release).
default:Release
package-symbols-disabled:
description:Disable creation of symbol packages (snupkg) for debugging
default:false
publish-enabled:
description:Set to true to enable publishing of artifact to a [NuGet feed](https://www.nuget.org/).
type:boolean
default:false
nuget-repo:
description:|-
Target NuGet package repository url to publish the packages to. (when overriding this, please set `DOTNET_NUGET_API_KEY` at project CI variable to set the [nuget api-key used by dotnet nuget push](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push))
_defaults to [GitLab project's packages repository](https://docs.gitlab.com/user/packages/nuget_repository/)_
Target NuGet package symbol repository url to publish the symbol packages to. (when overriding this, please set `DOTNET_NUGET_SYMBOL_API_KEY` at project CI variable to set the [nuget symbol api-key used by dotnet nuget push](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push))
_defaults to [GitLab project's packages repository](https://docs.gitlab.com/user/packages/nuget_repository/)_