Freigeben über


Continuous Deployment to Azure Automation DSC Part 3

Following on from the previous post - this time I create a separation between development and production.

I've created a build script to be used in the dev environment - it scans each of the script files and if the first line matches "Configuration" then it appends a DEV suffix to the configuration name and creates a new file name <<Configuration>>DEV.ps1. This allows me to create a new version of an existing configuration so I don't affect the production configurations.

snip_20170412132402

I had to make a change to the dev build task so it would run my new PowerShell script so I added in a new task to the build as below.

snip_20170412132639

I also updated the Copy Publish Artifact step to include all files.

snip_20170412132648

What this has allowed me to do is create an artifact with my dev configuration - my release script has also had some smarts added to it so it grabs all the *DEV.ps1 configurations and publishes and compiles them.

snip_20170412133320

When I transfer these changes to the production release (triggered by a merge to master) all I've had to do is update my release production script to publish and compile any configurations not including DEV in the name.

So far so good - next step will be to introduce multiple configurations and make sure I can process them.