Skip to content

Sample pipeline for managing PowerShell assets in Azure Automation

License

Notifications You must be signed in to change notification settings

andrewmatveychuk/azure.automation-account-pipeline

Repository files navigation

azure.automation-account-pipeline

A sample pipeline for managing PowerShell assets in an Azure Automation account.

Before starting to work with this sample project, I suggest reading the information in the following blog post:

Also, you might refer to the following posts regarding the building, publishing and accessing PowerShell modules during deployment:

Build Status

Build Status

Introduction

This repository contains the source code for a sample Azure DevOps pipeline that deploys PowerShell assets such as runbooks, modules, and DSC configurations into an Azure Automation account.

Getting Started

Clone the repository to your local machine and look for project artifacts in the following locations:

  • dsc-configurations - source code for a sample PowerShell DSC configuration
  • runbooks - source code for a sample PowerShell runbook
  • *.depend.psd1 files in corresponding folders - managing dependencies with PSDepend
  • *.build.ps1 - build configuration for InvokeBuild
  • *.deploy.ps1 - deployment configuration for PSDeploy

Build and Test

This project uses InvokeBuild module to automate build tasks such as running test, performing static code analysis, building the deployment artifact, etc.

  • To build the project, run: Invoke-Build
  • To see other build options: Invoke-Build ?

For deployment, the project uses PSDeploy module to simplify the deployment process and handle the dependency between the deployment artifacts. To get more information on how it works, please refer to PSDeploy docs.

To deploy from a local source:

  1. Create a target Azure Automation account
  2. Update the account name and its resource group name in azure.automation-account-pipeline.deploy.ps1
  3. In a PowerShell session, connect to your Azure environment (Connect-AzAccount)
  4. Run 'Invoke-Build Deploy'

Suggested tools

About

Sample pipeline for managing PowerShell assets in Azure Automation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published