Interface IBuildIdProvider
Defines a provider for generating a unique build identifier.
public interface IBuildIdProvider
Properties
BuildId
Gets the unique identifier for the current build.
string BuildId { get; }
Property Value
- string
Remarks
This ID should be consistent within a single build run but unique across different builds. If a build spans multiple jobs, this ID should be passed between them to ensure consistency.
Methods
GetBuildIdGroup(string)
Returns an optional grouping key for a given build ID, which can be used to organize artifacts or logs.
string? GetBuildIdGroup(string buildId)
Parameters
buildIdstringThe build ID to generate a group for.
Returns
- string
A string representing the group, or
nullif no grouping is implemented.
Examples
A date-based build ID like "2024-01-15-..." could be grouped by month, returning "2024-01".