Based on this link (http://docs.octopusdeploy.com/display/OD/Use+the+Team+Foundation+Build+Custom+Task), there are 2 ways of deploying Nuget package file to Octopus server:
- Using OctoPack to Create and Push a Package
- Add a Package Application step, Publish Package Artifact, Add a Push Package(s) to Octopus Step
I’m able to use option 1 to publish the file to my Octopus server. But I’m curious on using option 2 as well. I follow the step according to the link (including the argument value and etc). When VSO pushes the package after package artifact is being published, the console prompts me Package file not found.
I attached with the logs of the build for your reference.
logs_28.zip (11 KB)
Thanks for reaching out.
Could you send us a screenshot of your package push step in your build process where we can see the value of all the fields?
Please find the screenshot in the attachment.
I have not changed any value except the one in the screenshot
The “Push Packages to Octopus” step is pretty straight forward: you need to put the full path in disk (during the build) of the
.nupkg in the “Package” field, and the step will make sure to push that file.
From what I can see, you set the “Package HelloWorld” step to drop the package to
$(build.artifactsStagingDirectory), which doesn’t quite match with what you put in the “Package” field of the push step.
I’m not 100% familiar with the new TFS variables, but can’t you use the same path variable in both steps to make sure they point to the same place?
Thanks for the advise… It is able to push to my Octopus server after i have removed “Publish Artifact” and update package in “Push Package to Octopus” to $(build.artifactsStagingDirectory)\PackageName.
Attach a screenshot for reference
Hope that Octopus documentation also get update as well