Windows 10 Image Series – Part 5 – YAML Image Build Pipeline

In this series I am going to show you how build a Windows 10 Image via Azure Pipelines and DevOps without 3rd party tooling, welcome to part 5!

We built the image, deployed a sessionhost in the previous parts. Next up is converting the Image Pipeline to YAML Pipelines. In addition, YAML pipelines hold all the features. Classic Pipelines do not.

Prerequisites

Part 1, 2 & 3 of this series needs to be completed. These are the links:

1. Windows 10 Image Series – Part 1 (Creating the Windows VM Pipeline)

2. Windows 10 Image Series – Part 2 (Artifacts & Application Installation)

3. Windows 10 Image Series – Part 3 (Shared Image Gallery)

Therefore, the prerequisites from part 1 are also required for this part. So:

Firstly, I am assuming that you have knowledge of Azure DevOps. These are the parts that already need be setup:

In addition, if you don’t have knowledge about Azure DevOps and still want to follow this series please let me know. I might write a blog about the preparing Azure DevOps.

Checkout/Skip to other parts:

0. Windows 10 Image Series – Part 0 (Preparing Azure/Azure DevOps)

1. Windows 10 Image Series – Part 1 (Creating the Windows VM Pipeline)

2. Windows 10 Image Series – Part 2 (Artifacts & Application Installation)

3. Windows 10 Image Series – Part 3 (Shared Image Gallery)

4. Windows 10 Image Series – Part 4 (SessionHost Deployment via Powershell and Classic Pipelines)

6. Windows 10 Image Series – Part 6 (Deploy Sessionhosts with Bicep and YAML)

Converting the WVD Image Build Pipeline to YAML

In this paragraph, we are actually converting the pipeline to YAML. The proces is quite simple. For instance, this is the part which creates the Windows 10 VM:

Firstly, we need to create a YAML file in your repository in Azure DevOps. So, log on to Azure DevOps and go to repo’s:

Windows 10 Image Series – Part 5 - Repository's

After that, create a new file:

Windows 10 Image Series – Part 5 - Create new YAML File

After that, name the file:

In addition, you can name the file anything you like.

Next up, copy the contents of my YAML file on my public Github Repo and paste it into your YAML file.

Please replace these values in the file:

<<Service Connection Name>>
<<Subscription ID>>
<<PAT Token>>
<<Artifact Build>>
<<DevOps Org Name>>
<<DevOps Project Name>>

After that, click on commit:

Secondly, we create the new YAML based pipeline. Go to Pipelines and click on new:

After that, click on “Azure Repos Git (YAML)”. In addition, you can also connect to the other Git repo options if you prefer that.

Choose the correct repository:

After that, pick “Existing Azure Pipelines YAML file” (the one we create earlier).

And select the proper file:

Save the pipeline:

Running the Pipeline

Go to your newly created YAML pipeline and click on run:

When you run the pipeline, these options are available:

When we look at stages, you can select which parts of the pipeline are run:

Please select the stages you want to use and click on run.

Eventually the pipeline has completed with the following result:

This was Windows 10 Image Series – Part 5, check out the other parts:

0. Windows 10 Image Series – Part 0 (Preparing Azure/Azure DevOps)

1. Windows 10 Image Series – Part 1 (Creating the Windows VM Pipeline)

2. Windows 10 Image Series – Part 2 (Artifacts & Application Installation)

3. Windows 10 Image Series – Part 3 (Shared Image Gallery)

4. Windows 10 Image Series – Part 4 (SessionHost Deployment via Powershell and Classic Pipelines)

6. Windows 10 Image Series – Part 6 (Deploy Sessionhosts with Bicep and YAML)

Related Posts

9 thoughts on “Windows 10 Image Series – Part 5 – YAML Image Build Pipeline

Leave a Reply

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