How do I view the contents of my build artifact folder in Azure Dev Ops?
Asked Answered
T

3

2

I am trying to modify my configuration file, dataSettings.json, located somewhere inside the build artifacts folder. Figuring out the correct access path to it is like working in the dark. Using "**/dataSettings.json" as a path doesn't work in my task since I don't know the artifact's folder structure, nor wether dataSettings.json even exists.

Is there a way to quickly view the contents of a build artifacts folder within DevOps?

Tiffie answered 24/2, 2021 at 16:30 Comment(0)
A
3

You can quickly view the contents of the artifacts in many of the tasks in your release pipeline.

For example, If you are using File transform task or Azure App Service deploy task. You can click the 3dots at the right end of the Package or folder field to view the contents and folder structure of the artifacts.

enter image description here

The Source Folder field of Copy files tasks for example:

enter image description here

If the artifacts is a zip file. You can navigate to its correponding build pipeline runs and download the artifacts locally to check its contents. You can download the build artifacts at the Build summary page.

enter image description here

Autointoxication answered 25/2, 2021 at 4:1 Comment(3)
The pipeline user interface is very confusing. It's hard to know where you are at any given time. Getting around those screens is like driving around with no map and hitting dead ends. Microsoft needs to hire people who have a clue on UI design. You have a type-in field with a variable name inside it. How is the user supposed to know the ellipse will reveal the contents of the folder specified by the variable, especially if that folder hasn't been built yet. Intuitively, a user would expect it to present other source folder variables for selection.Tiffie
Also, the user should never be have to type in a variable name manually. It's easy to make a typo, Instead, the user should select one from a drop down list. It's also unclear how the task choose the default variable name. Finally, the entire pipeline system is aweful! There's a UI for creating a task, but none for editing it. You have to modify it in that godforsaken YAML!Tiffie
This worked for me: I clicked on the Pipeline, chose the latest run and under the Related heading, was able to find the Published link from the OP screenshot. I then clicked the link, the zip file downloaded and was able to confirm the presence of files.Volscian
M
2

Add a script step in your shell scripting language of choice (bash, PowerShell, Windows command prompt, etc) that recursively outputs the directory structure. Specific commands are easy to Google. i.e. PowerShell would be gci -rec. DOS would be dir /s. Bash would be ls -R.

Mikimikihisa answered 24/2, 2021 at 17:7 Comment(5)
Seriously? Seriously? Come on Microsoft! So I have to wait in a queue for the build to complete just so I can see what in the artifacts folder? I thought timesharing, teletypes and batch processing were history. Who knew?Tiffie
I'm not aiming at you, but Microsoft.Tiffie
I don't know how else you'd do it. You want to see the file system contents during a process. The contents are ephemeral and will change from build to build.Mikimikihisa
You want to see the result of a build (a build artifact) before the build has finished... building it?Subaquatic
No, I want to see the contents of the artifacts after major stage of the build process. There's an option to download the drop in the release summary, but none for the actual build process. How can Microsoft expect you to target files if you don't know where they are? The release drop doesn't have the same structure as the final deployment folder.Tiffie
C
2

This way worked for me: "You should add Publish Build Artifacts task at the end of the build, then the zip file will be available in the build summary, and you could download it in the release:"

To add some detail, the results are seen this way.

First, my .yml file.

enter image description here

Then to view results:

  1. View recent pipeline runs. enter image description here

  2. Click on most recent, to open it. enter image description here

  3. Click on last job, to open it. enter image description here

  4. Click on Artifact link and voila. (My job was just to copy some text files, and there they are. I later added a flattenFolders: true input to the PublishArtifacts task, to get rid of the folder hierarchy.)

enter image description here

Calctufa answered 12/10, 2023 at 20:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.