diff --git a/20.-Azure-Devops-pipelines.md b/20.-Azure-Devops-pipelines.md new file mode 100644 index 0000000..ff2825b --- /dev/null +++ b/20.-Azure-Devops-pipelines.md @@ -0,0 +1,28 @@ + +## Build pipelines + +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. + +We use _path filters_ to queue only the build when commits have files in certain paths. For example, this is the _path filters_ sections of the Web Status microservice: + +```yaml + paths: + include: + - src/BuildingBlocks/* + - src/Web/WebStatus/* + - k8s/helm/webstatus/* +``` + +The build will be triggered if the commits have some file in these folders. Any other change won't trigger the build. Using _path filters_ we have the flexibility to use a single repository, separated builds and trigger only the needed builds. + +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. + +## 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/). + +* Linux image have tag `linux-` where `` is the git branch that triggered the build. +* Windows image have tag `windows-` where `` is the git branch that triggered the build. + +We have **multiarch tags**, for the tags `dev`, `master` and `latest`, so you don't need to use `win-dev` or `linux-dev`, the tag `dev` will pick the right architecture automatically. Only this three tags have multiarch, **and they are the only tags intended to be used**. The tag `dev` is the most updated. +