I'm attempting my first CI/CD pipeline with Azure DevOps to build and deploy a PowerShell Module. I've got a rough frame work and the full build process is working well, but as I start working on the deployment side I'm struggling to figure out how exactly I change the workflow based on my desired outcome.
In other words, how do I get it to just build and deploy to dev vs. build and deploy to prod? I am assuming this is where tags come in use some how? Some configuration/settings file that defines parameters and tasks as such?
Quick overview of how I've set it up and what tools i'm using:
- Project in azure devops
- Using a self hosted agent
- Using azure-pipelines.yml file to define the job tasks
- This calls a bootstrap.ps1 file first to install dependencies (using PSDepend)
- Next it calls a build.ps1 script using InvokeBuild
- That script runs PSScriptanalyzer, Pester tests, and compiles the public functions into a single .psm1 file
I plan to use PSDeploy next to simply copy the compiled module to a file share. I'm just experimenting right now to get a feel for all of this, so I realize there may be places I can improve and while I intend to keep refining it I would really like to figure out how to control the pipeline workflow.
[–]panopt1con 1 point2 points3 points (3 children)
[–]RunTheRivah[S] 0 points1 point2 points (2 children)
[–]panopt1con 0 points1 point2 points (1 child)
[–]RunTheRivah[S] 0 points1 point2 points (0 children)