cake-contrib / Cake.Recipe

:page_with_curl: A set of convention based Cake scripts
https://cake-contrib.github.io/Cake.Recipe
MIT License
70 stars 53 forks source link

Support running on multiple Azure Pipelines #469

Open pascalberger opened 4 years ago

pascalberger commented 4 years ago

With support for Azure Pipelines comes the ability to have multiple jobs in a build, which e.g. run on different platform. This means that e.g. artifacts are created and published multiple times in a single build. Without a unique name they will be overwritten with the one from the latest job. There should therefore be a way to make them unique for each job.

pascalberger commented 4 years ago

Cake.Issues.Recipe has solved this with a BuildIdentifier parameter, which can be set in the build script to define a different value for different runs.

pascalberger commented 4 years ago

Cake.Recipe should set IssuesParameters.BuildIdentifier for proper Cake.Issues.Recipe configuration

gep13 commented 4 years ago

@pascalberger can you suggest what this BuildIdentifier should be set to? Do you have any examples? Thanks

pascalberger commented 3 years ago

@gep13 For Cake.Issues.Recipe integration tests it is set here:

https://github.com/cake-contrib/Cake.Issues.Recipe/blob/798396d6931c20f58d631c0b7529ab00ed82338c/tests/integration/build.cake#L34

This results in the following artifacts:

https://dev.azure.com/cake-contrib/Cake.Issues.Recipe/_build/results?buildId=4930&view=artifacts&type=publishedArtifacts

AdmiringWorm commented 3 years ago

I renamed the issue a bit, as saying multiple platforms could be a bit misleading. IMO that would suggest that Cake.Recipe can't run on different OS's, which it can do.

pascalberger commented 3 years ago

Issue is not only limited to Azure Pipelines, but any CI system where builds run in different configurations

AdmiringWorm commented 3 years ago

There are only two build providers that I know of that could exhibit this problem. Azure pipelines and GitHub actions (which don't support artefacts upload within the cake script).

Other build providers, I have experience with uses artefacts in separation based on the current run.