简体   繁体   中英

Error in release pipeline : Container path not found

I searched in several forums and everyone suggested to add below line in the yaml.

- task: PublishBuildArtifacts@1

In my case, i am using the classic editor as it is my first time learning Devops. The publish artifact task was already added but I still see the error, "Container path not found". Can someone let me know what am i missing here?

My release pipeline is looking for "D:\a\r1\a.." path whereas artifacts were copied to "D:\a\1\a.." in the build pipeline.

My release pipeline is looking for "D:\a\r1\a.." path whereas artifacts were copied to "D:\a\1\a.." in the build pipeline.

The release pipeline will download your build artifact to the folder "D:\a\r1\a". You can find this in your release logs: 在此处输入图像描述 I can reproduce your issue if the Working Directory of the command line task is incorrect. Please make sure the Working Directory of your task is exist.

在此处输入图像描述

Update: For example: I want to run test.exe in my folder: 在此处输入图像描述

The working directory should be $(System.DefaultWorkingDirectory)/_Jan-CI/drop/test here. 在此处输入图像描述

Sorry can't comment on Walter's answer atm but just want to add to Walter's answer. Based on the error

Container path not found: 'D:\a\r1\a_MyFirstPipeline\drop\bin\Release\TestDevOps.exe' ` $(System.DefaultWorkingDirectory)/_MyFirstPipeline/drop/bin/Release/TestDevOps.exe``

It seems like you might have a typo. There is an extra 'a' before '_MyFirstPipeline' in your path compared to the 2nd one

Also, as per Walters comments, if you provide your code then it'll help people diagnose and help more.

I'm going to assume that if your pipeline is looking for your artifact in a different place than where your artifact is stored then thats the error and the cause could be a typo. Check your code that is publishing the artifact and what location it is using and the code where you're trying to fetch it from matches.

I had a similar issue and noticed that my release pipeline has the option enabled "Skip download of artefacts" so in my case release working directory is empty (r1 or r2)

Please note during release, the file will be copied from "_Work<somenumber>\a" to "_work\r\drop..."

Example: "_Work\2\a" to "_work\r2\drop..."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM