diff --git a/20.-Azure-Devops-pipelines.md b/20.-Azure-Devops-pipelines.md index 25ea108..b833283 100644 --- a/20.-Azure-Devops-pipelines.md +++ b/20.-Azure-Devops-pipelines.md @@ -1,5 +1,5 @@ -## Build pipelines +## Build pipelines YAML definitions Folder `/build/azure-devops` has all the YAML files for all build pipelines. Although (for simplicity reasons) eShopOnContainers has all code in the same repo, we have one separated build per microservice. All builds have two jobs (named `BuildLinux` and `BuildWindows`) that build the linux version and the windows version of the microservice. @@ -17,6 +17,26 @@ The build will be triggered if the commits have some file in these folders. Any Plase, refer the [Azure Devops YAML build pipelines documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema) for more information. +### Azure Devops Build pipelines + +We have a build pipeline for each service in Azure Devops created from the YAML file. To create build pipeline from an existing YAML file, create a new build pipeline in Azure Devops: + +![Create a new build pipeline - step1](./img/azure-devops/build1.png) + +Select the repository where you have the code (like Github) and select the repository where you have the eShopOnContainers code. Then in the _Configure_ tab select the option _Existing Azure Pipelines YAML file_: + +![Selecting Existing Azure Pipelines YAML file option](./img/azure-devops/build2.png) + +Then you need to enter the YAML file to use: + +![Entering the path of the YAML file to use](./img/azure-devops/build3.png) + +In the _Review_ tab you'll see the content of the YAML file, and you could review (and update it if needed). + +Once the build pipeline is created in Azure Devops you can override some of its parameters (i. e. the branches affected or if the build is a CI build or must be launched manually). For it, select the build pipeline and edit it. In the _review_ tab you can click the 3-dots-button to override the parameters: + +![Editing the build pipeline](./img/azure-devops/edit-build.png) + ## Windows vs Linux images Each build generates the windows AND linux images (note that we could have two separated builds instead). Build pushes the images to [eshop Dockerhub](https://hub.docker.com/u/eshop/). diff --git a/img/azure-devops/build1.png b/img/azure-devops/build1.png new file mode 100644 index 0000000..a56267c Binary files /dev/null and b/img/azure-devops/build1.png differ diff --git a/img/azure-devops/build2.png b/img/azure-devops/build2.png new file mode 100644 index 0000000..eb748a1 Binary files /dev/null and b/img/azure-devops/build2.png differ diff --git a/img/azure-devops/build3.png b/img/azure-devops/build3.png new file mode 100644 index 0000000..1fa9423 Binary files /dev/null and b/img/azure-devops/build3.png differ diff --git a/img/azure-devops/edit-build.png b/img/azure-devops/edit-build.png new file mode 100644 index 0000000..a6a350a Binary files /dev/null and b/img/azure-devops/edit-build.png differ