DevOps Workflows
The DecSm.Atom.Module.DevopsWorkflows module provides deep integration with Azure DevOps Pipelines, enabling you to define, generate, and interact with Azure DevOps workflows directly from your DecSm.Atom build definitions. This module streamlines the process of creating CI/CD pipelines on Azure DevOps, offering C#-based abstractions for common workflow patterns.
Features
Workflow Generation: Define Azure DevOps Pipelines in C# and generate the corresponding YAML files.
Azure DevOps Environment Access: Easily access Azure DevOps environment variables and context information.
Artifact and Publish Path Integration: Automatically adjusts artifact and publish directories to align with Azure DevOps conventions.
Custom Agent Pool Configuration: Define custom agent pools or use matrix strategies for job execution.
Build Summary Reporting: Integrates build outcome reporting directly into Azure DevOps build summaries.
Variable Management: Supports writing output variables that can be consumed by subsequent steps or jobs.
Getting Started
To use the Azure DevOps Workflows module, implement the IDevopsWorkflows interface in your build definition. This will configure the necessary services for Azure DevOps integration.
Implementation
Add the IDevopsWorkflows interface to your Build.cs file:
using DecSm.Atom.Build.Definition;
using DecSm.Atom.Module.DevopsWorkflows;
namespace Atom;
[BuildDefinition]
internal partial class Build : IDevopsWorkflows
{
// Your build targets and other definitions
}Defining Workflows
You can define Azure DevOps Pipelines using the WorkflowDefinition class and its associated options.
Example: Basic CI Pipeline
When you run your build with this definition, a ci.yml file will be generated in your .devops directory (or wherever your Azure DevOps pipeline definition expects it).
Azure DevOps Environment Variables
The Devops.Variables static class provides strongly-typed access to common Azure DevOps environment variables.
Custom Agent Pool Configuration
You can specify custom agent pools or use a matrix strategy for your pipeline jobs.
Variable Management
The module allows you to write output variables that can be consumed by subsequent steps or jobs within the pipeline.
Checkout Options
You can customize the checkout behavior using DevopsCheckoutOption.
Build ID from Azure DevOps Run ID
You can configure DecSm.Atom to use the Azure DevOps Build.BuildId as the internal workflow ID.
Last updated
Was this helpful?
