Azure-devops-docs: How to properly publish artifacts from multi-configuration setup?

Created on 27 Apr 2018  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

Please provide a guide using best practices for the multi-configuration build approach.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

doc-bug help wanted product-question unspecifiesvc

Most helpful comment

@mlearned We use multi-configuration to build and publish multiple projects from a solution.

Essentially:

  1. Create variable called Projects with value of: MySolution.Client,MySolution.Admin,MySolution.API
  2. Set a phase to multi-configuration, using the Projects variable as the multipler, with 3 agents (we want to build all three configurations at once).
  3. Note you can apparently double up on multipliers (e.g. Projects and BuildConfiguration eg. Debug/Release - resulting in x*y number of jobs ran)
  4. Publish the packaged builds using the variable $(Projects) for path and and artifact name.

The process, as an example, looks like this:
image

Resulting build shows 3 separate artifacts, which can then be individually consumed by release pipeline stages:
image

All 6 comments

@Advanium can you provide some additional details on this one? I assume you are referring to executing a build that runs for multiple configurations (thus producing multiple sets of outputs), is that correct? And you are looking to understand the process for publishing all artifacts from all configs there, do I have it correct?

@mlearned Yes, I was wondering if there is any guidance on multi-configuration builds using f.e. the BuildConfiguration and BuildPlatform modifiers. I especially like to have more insights on how to configure the steps involved in supporting multi-configuration builds: how to configure output directories, debug symbol packaging and artifact publishing.

I found it hard to grasp how to set up the folder structure in case of multi-configuration builds and accidently overwrote build output in the first couple of tries.

I also ran into issues with parallel builds having the "clean" option of the build solution task enabled. As each build wasn't run in isolation, files were deleted and the build would fail. It would be great to be notified that in multi-configuration mode, cleaning specific directories will have side effects.

In the end, I had like 30 changes of my build configuration until the build pipeline worked.

I think single artifact builds tend to be easier to setup and would appreciate a section dedicated to multi-configuration builds and how to deploy specific artifacts.

This Task is very slow. According to this (https://docs.microsoft.com/de-de/vsts/pipelines/tasks/utility/publish-build-artifacts?view=vsts) there is an option for parallel which is false on default. Is this the case for VSTS and is it possible to activate parallel copy?

@mlearned We use multi-configuration to build and publish multiple projects from a solution.

Essentially:

  1. Create variable called Projects with value of: MySolution.Client,MySolution.Admin,MySolution.API
  2. Set a phase to multi-configuration, using the Projects variable as the multipler, with 3 agents (we want to build all three configurations at once).
  3. Note you can apparently double up on multipliers (e.g. Projects and BuildConfiguration eg. Debug/Release - resulting in x*y number of jobs ran)
  4. Publish the packaged builds using the variable $(Projects) for path and and artifact name.

The process, as an example, looks like this:
image

Resulting build shows 3 separate artifacts, which can then be individually consumed by release pipeline stages:
image

@Advanium, thanks for the feedback and I'm sorry for the late response! Have you updated to use the publishPipielineArtifacts and are you still struggling with the same issues?

@chasewilson Thank you. I didn't have the chance to try the build pipeline again, but the steps provided by @iyerusad sound reasonable and look like a good approach to parallel multi-configuration builds.

I figure that it's more of a lack of experience with the product than a lack in documentation, so I'll close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dannyvv picture dannyvv  Â·  3Comments

KacperMucha picture KacperMucha  Â·  3Comments

adnanebrahimi picture adnanebrahimi  Â·  3Comments

LennartAJansson picture LennartAJansson  Â·  3Comments

csutorasr picture csutorasr  Â·  3Comments