Adding module to pipeline

When all preparations are done, and you have added the PowerShell module to the Repository, and you have prepared the pipelines with the Variable group it is time to setup your first build pipeline.

This blog is part of a series of blog about “Creating PowerShell modules with Azure DevOps.

Setting up your first build pipeline is extremely easy to do, you just need to go to the repository and the DevOps server itself will detect that there is a “azure-pipelines.yml” file present and will ask you to “Set up build”.

You just need to go through the wizard and the Azure DevOps will automatically generate the correct pipeline.

Last you should not forget to setup the module name as a variable within the build pipeline.

After all steps are done you now test your new build pipeline for the first time.

Setting up the build pipeline steps

  • Log in the Azure DevOps environment. (https://dev.azure.com/)
  • Select the project you are working on.
  • Select “Repos
  • Select the correct Repo
  • Select “Set up build
  • Select “Variables
  • Select “New variable
  • Add “module.Name” in Name
  • Add “TheNameOfTheModule” in Value
  • Select “New variable
  • Add “module.MajorVersionNumber” in Name
  • Add “1” in Value
  • Select “Save

The configuration is now done, so you need to test the build pipeline.

First test of the build pipeline

  • Last step is “Run pipeline” this will start the first deployment.
  • Select “Run

Leave a Reply

Your email address will not be published. Required fields are marked *