See Build Artifacts in Azure DevOps with YAML Pipeline

Jens Caasen

I seem to be missing something. When creating a build pipeline with the classic editor I can see an artifacts tab on the top right:

enter image description here

There I can browse what the compiler created, helping to find out the folder structure for the release pipeline.

Now when I create a build pipeline with the YAML template (also NET Framework) there is no such thing as Artifacts:

enter image description here

According to the logs, some files have been written. Is there some kind of browser for files, or do I have to guess which of these variables match to which folder in the logfiles?

This is how my summary page looks like: enter image description here

This is the YAML:

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/Release.zip'
    replaceExistingArchive: true

The YAML i use is mostly the standard YAML produced when building from a Github Repository. Does this affect if i can see Artifacts? Should i somehow copy the Github content to Azure first and then build it?

Jens Caasen

Update: i found the problem: The default YAML file for GitHub Builds does NOT include a "publish" Step. After adding this to the end of the Build YAML

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

it in fact creates the "Artifacts" Tab: enter image description here

Thanks for the help anyone

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How build artifacts are managed in Azure DevOps pipeline?

Azure DevOps yaml pipeline: configure Azure Artifacts "package" resource

Combine variables in Azure Devops Build Pipeline YAML

Can't see my build artifacts after Azure Pipeline finished

Azure DevOps - Drop folder empty in React build for Azure YAML pipeline

Azure DevOps - use GUI instead of YAML to edit build pipeline

How to send post build message in azure DevOps YAML pipeline?

How to edit yaml path for azure devops build pipeline?

How to have conditional image tags on azure devops build yaml pipeline?

Azure DevOps - Maven Pipeline publish artifacts

Debugging in Azure DevOps Yaml Pipeline

Azure DevOps yaml pipeline trigger

Azure pipeline to build public github project, pipeline yaml stored in Azure Devops Git

Want to read xml file from published artifacts in azure devops build pipeline

Trigger a Release (CD) pipeline from Build (CI) pipeline YAML file in Azure DevOps

Azure pipeline build artifacts for previous builds

Azure Devops Pipeline build explorer

Azure Devops Pipeline Docker Build

flutter build pipeline with azure devops

Azure yaml build and release pipeline

Azure DevOps yaml pipeline, downloaded artifact is empty

Git tag name in Azure Devops Pipeline YAML

GitVersion on Azure DevOps yaml pipeline fails on Linux

Azure Devops YAML Pipeline Trigger on different repositories

Azure Devops YAML pipeline - how to repeat a task

Azure DevOps Pipeline - YAML formatting error?

YAML Parser error on Azure DevOps Pipeline

Clean All build directories in Azure DevOps Pipeline settings is not working while using YAML configuration

How to specify connection details for SSDT unit tests when run in Azure Devops yaml build pipeline