0

I run UI tests for my app in a release definition in Azure DevOps. I generate test report. I decided that it is convenient to save it in the build directory(wrong assumption?). The directory where the report is is:

browserName + DateTime.Now.ToString("ddMMyyyyHHmmss", CultureInfo.InvariantCulture) + @"\";

so the directory regex would be for instance : Chrome\d+

I build the test project in the release pipeline, run the tests, then I try to publish my report. The goal is to make it available in the Azure DevOps, or send a link to download it or any other way that makes it accessible.

enter image description here

To do so I added a step Publish Build Artifact enter image description here

but then I get an error:

enter image description here

but then I don't have a fileshare available(I am able to create Azure Storage Account for instance) additionaly Publish Build Artifact doesn't support wildcards so I can't use regex Chrome\d+ to pin down the report directory.

Question: How can I make a file that is generated during release pipeline accessible?

EDIT: I found out in the meantime that I have Sharepoint available with enough storage.

Yoda
  • 17,363
  • 67
  • 204
  • 344

1 Answers1

0

Unfortunately publishing from release pipeline is not allowed.

Can we publish artifacts in release pipeline - Azure devOps?

One way to get around this is to try to publish Universal package in release pipeline but it has limitations. Create feed and publish there your files so you can share URL to others. It is not best option but if your test results files are not large you can publish to the feed and clean it sometimes(manually, because REST API provides way to delete package but does not provide function to get list of all packages published).

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/package/universal-packages?view=azure-devops

The disadvantage of this option is that for free users it has limit up to 2GB. You can delete old packages when required but it takes around 24 hours to free space. But you can forget to free space and your pipeline will fail with not enough storage error and by next 24 hours you will have to disable this task to let pipeline pass.

"I decided that it is convenient to save it in the build directory" Remember that agent working directory is cleaned depending on option you choose. https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#clean-the-local-repo-on-the-agent

Kontekst
  • 946
  • 8
  • 17
  • I'm diggind into Universal Packages, but in the meantime I found out that I have sharepoint, maybe I can write a Powershell that publishes it there. Found youtube video about uploading files to the Sharepoint with PS: https://www.youtube.com/watch?v=PbusAK1tMjU&feature=youtu.be – Yoda Jan 17 '20 at 17:24