0
votes

It appears as if the Azure dev ops pipeline successfully completes publishing the universal package with the UniversalPackage@0 task defined in my pipeline.yml file

# Publish Universal Package
- task: UniversalPackages@0
  displayName: 'Universal publish'
  inputs:
    command: 'publish'
    publishDirectory: '$(Build.SourcesDirectory)/release'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: 'SME/P3'
    vstsFeedPackagePublish: 'sme-p3'
    versionOption: 'patch'
    packagePublishDescription: 'sme p3 files'

However when I look in the artifact-feed I don't see anything. What can be the reason for this? I'm able to publish this package using azure client on my windows machine but would really like to publish it via a pipeline. Any ideas what could be going on?

Starting: Universal publish
==============================================================================
Task         : Universal packages
Description  : Download or publish Universal Packages
Version      : 0.169.2
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks
==============================================================================
SYSTEMVSSCONNECTION exists true
Downloading: https://0t3vsblobprodcus362.vsblob.vsassets.io/artifacttool/artifacttool-win10-x64-Release_0.2.128.zip?sv=2019-02-02&sr=b&sig=OJQlTNqKnAnKymyuriGCGvAYbuhweqLb9skkk60PA0E%3D&spr=https&se=2020-06-18T15%3A13%3A48Z&sp=r&P1=1592492928&P2=11&P3=2&P4=aTtfv%2fhXIBUtlTO2nwePgROhTGvaZoMqq3eF7CPCwTs%3d
Caching tool: ArtifactTool 0.2.128 x64
SYSTEMVSSCONNECTION exists true
Finishing: Universal publish
1
Have you confirmed that $(Build.SourcesDirectory)/release contains the files you want to publish? The most likely scenario is that nothing is showing up because you're not publishing any files. Did you try running with system.debug set to true?Daniel Mann
Yes, the $(Build.SourcesDirectory)/release contains the files I want to publish. I ran with system.debug set to true. I got the following logs ` 2020-06-22T17:39:33.2912819Z ##[debug]Created webApi client for feeds.dev.azure.com/my-org; options: {"proxy":null,"allowRetries":true,"maxRetries":5,"ignoreSslError":false} 2020-06-22T17:39:34.7959115Z ##[section]Finishing: Universal publish `kjarvind

1 Answers

0
votes

There is no publish in the log, so you won't see the package. There are two things need to be noticed:

  1. publishDirectory doesn't support format $(Build.SourcesDirectory)/release, you can publish files in $(Build.SourcesDirectory)/release to $(Build.ArtifactStagingDirectory), and then use $(Build.ArtifactStagingDirectory) in publishDirectory: publishDirectory: '$(Build.ArtifactStagingDirectory)'

  2. Check whether feed P3 in team project SME, and make sure feed P3 in Project scoped feeds.

enter image description here


Update:

Share my whole YAML file for your reference:

trigger:
- master

pool:
  vmImage: 'vs2017-win2016'

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

steps:
- task: UniversalPackages@0
  displayName: 'Universal publish'
  inputs:
    command: 'publish'
    publishDirectory: '$(Build.SourcesDirectory)'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: 'projectName/feedName'
    vstsFeedPackagePublish: packageName
    versionOption: 'patch'
    packagePublishDescription: test