Modules Overview
A module is a NuGet package that adds reusable functionality to an Atom build — targets, parameters, service registrations, or workflow options. Add one when you need an integration that the core packages do not provide.
How Modules Work
Modules are typically distributed as interfaces. Your build definition implements the interface, and the source
generator + [ConfigureHostBuilder] attribute wire everything up automatically:
[BuildDefinition]
[GenerateEntryPoint]
internal partial class Build : WorkflowBuildDefinition, IGitVersion, IAzureKeyVault
{
// All targets and parameters from IGitVersion and IAzureKeyVault
// are automatically available.
}
Adding a Module
Install the NuGet package:
dotnet add package Invex.Atom.Module.GitVersionImplement the module's interface on your build class:
internal partial class Build : BuildDefinition, IGitVersion { }That's it. The module's services are registered, its targets are discoverable, and its parameters appear in help output.
First-Party Modules
| Package | Interface | Description |
|---|---|---|
Invex.Atom.Module.Dotnet |
(various) | .NET CLI helpers (build, test, pack, publish) |
Invex.Atom.Module.GitHubWorkflows |
IGitHubWorkflows |
GitHub Actions workflow writer and helpers |
Invex.Atom.Module.DevOpsWorkflows |
IDevOpsWorkflows |
Azure DevOps Pipelines workflow writer and helpers |
Invex.Atom.Module.AzureKeyVault |
IAzureKeyVault |
Azure Key Vault secrets provider |
Invex.Atom.Module.AzureStorage |
IAzureArtifactStorage |
Azure Blob Storage artifact provider |
Invex.Atom.Module.GitVersion |
IGitVersion |
GitVersion-based build ID and version providers |
Module Conventions
- Modules expose their functionality through interfaces that extend
IBuildAccessor. - Targets are defined as
Targetproperties on the interface with default implementations. - Parameters are declared with
[ParamDefinition]or[SecretDefinition]. - Service registration uses the
[ConfigureHostBuilder]attribute with a static partialConfigureHostBuilderFrom{InterfaceName}method. - Build options are extended via the static
BuildOptionsclass using extension-like patterns.
Next steps
- Module pages: .NET · GitHub Workflows · DevOps Workflows · Azure Key Vault · Azure Storage · GitVersion
- Writing a Module: build and publish your own module.