Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Universal Publish task fails in Azure Devops Pipeline ( Could not create provinence session)

I am exploring the azure artifacts service provided by azure devops. I have created a simple c++ helloworld program, which gets compiled and stores the executable in another folder.

To understand how the publishing to azure artifact works, I have copied the executable to the artifact directory, and I call the task to upload the artifact.

Below is the pipeline:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

steps:

- script: |
    mkdir output
    g++ tests.cpp -o output/test
    cd output
    ls -l
    ./test


- task: CopyFiles@2
  inputs:
    Contents: 'output/**'
    targetFolder: $(Build.ArtifactStagingDirectory)

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

    
- task: UniversalPackages@0
  displayName: Universal Publish
  inputs:
    command: publish
    publishDirectory: '$(Build.ArtifactStagingDirectory)'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: 'Department/E-S-S-Test'
    vstsFeedPackagePublish: 'testproject'
    packagePublishDescription: 'containstestdescription'
    versionPublish: '1.0.0'

I am getting the following error :

##[warning]Could not create provenance session: %s
##[warning]Cannot read properties of null (reading 'sessionId')
##[error]Error: Failed to get package versions
##[error]Packages failed to publish

I checked into feed settings, there is a contributor access given to Project Collection Build service group.

What is going wrong here?

>Solution :

Probably you may need provide the ProjectID /FeedID in the vstsFeedPublish

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading