Not getting nupkg file from successful jenkins build

(John Fox) #1

Hi there,

I’m after some help and advice to get a project in jenkins to publish a package using octopack to pass onto Octopus Deploy. The project is a .net project and I have the msbuild command pointing at the project file (website\myproject.csproj). The repo contains a number of projects and I’m just after the website project in there and targeting the csproj file.

The command/switches I’m running in the msbuild build action in Jenkins is:

msbuild file - Chilindo\Chilindo.csproj

/p:OctoPackAppendToPackageId=Live /p:RunOctoPack=true /p:OctoPackPackageVersion=0.1.${BUILD_NUMBER} /p:OctoPackPublishPackageToFileShare=C:/Octopus/packages /p:OctoPackPublishApiKey=${OctopusDeployWebApiKey} /p:Configuration=Release

The project builds and completes successfully but I am not seeing any packages being output into the folder. Got other projects working as expected on the server using a similar setup (mainly pointing at the solution file).

Any idea on what I need to do in order to get my package?

(Jason Brown) #2

Hi John, thanks for getting in touch

Given that you’re providing an API key, I’d have thought you’d be publishing to a Nuget/Octopus gallery, with


However, you should still be able to push to a file share if that’s your aim. Couple of things I’d check

  1. I’d have a good dig in the full build log, see if there’s a hidden failure in there that’s not actually exiting correctly and failing the build
  2. try “standard” windows path separation with backslashes (possibly escaped as \\, depends on the platform)
    2a The tool should create the folders/subfolders for you, but making sure c:\Octopus\packages actually exists on the build agent/target may be prudent
  3. I’d also run a quick filesystem search to see if the file’s been dropped into another folder for some reason. Seems unlikely but I’ve seen weird things before and I never rule this one out.

Hope this helps in some way, feel free to get back to me if it doesn’t.



(John Fox) #3

I’ve manage to get it sorted. I was missing the octopack config line in the csproj file with it being a .net project. Been working with net core projects for so long and forgot about the change.

<Import Project="..\packages\OctoPack.3.0.42\tools\OctoPack.targets" Condition="Exists('..\packages\OctoPack.3.0.42\tools\OctoPack.targets')" />

The build and release is split over two different tasks so not too sure the api key in there is even needed.

Thanks for the assistance

(Jason Brown) closed #4