Deploy to Tentacle from Jenkins - The command exited with code 1 - request help on build parameters

I have successfully installed Octopus server and Tentacle. I have a working Jenkins build server which then has the following line for command line arguments in build :

/t:MyWeb /p:Configuration=$Config /p:DeployOnBuild=true /p:PublishProfile=$PublishProfile /p:RunOctoPack=true /p:OctoPackPackageVersion=1.1.${BUILD_NUMBER}
/p:OctoPackPublishPackageToHttp=http:///nuget/packages
/p:OctoPackPublishApiKey=API-L
************

I copied the API key from Profile API Keys
I did not create a site on the host for /Nuget/Packages but did install the Listener Tentacle and completed the setup.

The build works and creates the nuget package - I am not battling to publish the package.

This is the error I get :

The command “\NuGet.exe” push “MyWeb.1.1.129.nupkg” API-**************** -Source http://*********:10933 " exited with code 1.

Is my command incorrect?

The documentation states that I can get the URL from Library -> Packages - but this does not show me the correct URL - it shows how to do it - I then replaced “localhost” with the proper IP address.

Hi,

Thanks for getting in touch! I think the problem here is the expectation. You cannot push packages directly to Tentacles. You need to push them to a feed or repository (like our internal repository) when the release is deployed to a Tentacle we will then move the packages around. You can change the settings in the project to always download the package directly from the Tentacle, but if you are using the Octopus internal repository then we will still stream it from the Octopus server.

To make your nuget.exe push command work you will need to provide the Octopus server /nuget/packages endpoint as the source.

Please let me know if you have any futher questions or I can expand apon anything I have said.
Vanessa

Hi Vanessa

Thank you for the help - I changed it to localhost and now it builds successfully.

@Damovisa said I should have a look at this link:

“You need to push them to a feed or repository (like our internal repository)” - is this was now handled by this line:
" /p:OctoPackPublishPackageToHttp=http://localhost/nuget/packages" ?

Happy to report that the package built by Jenkins now appears on the Jenkins/Octopus server under available packages: “http://localhost/app#/library/packages

By default it adds the package with the ID of the Web Project that I built e.g.MyWebProject (if no additional parameters are stated in Jenkins)

If I add this line to the Jenkins build arguments “/p:OctoPackAppendToPackageId=MySpecificPackageID”, then the ID is listed as “MyWebProject.MySpecificPackageID”

I am now figuring out how to get the package deployed to the tentacle

Hi,

Great to hear. To answer your question is this was now handled by this line: " /p:OctoPackPublishPackageToHttp=http://localhost/nuget/packages" ? Yes that is correct. Octopack itself will also use nuget.exe to send the built packages directly to a NuGet feed or repository, so you do not need another step to push the packages if you are using that.

To start on deploying packages I would suggest the following documentation:
http://docs.octopus.com/display/OD/Deploying+packages

There are also videos (https://octopus.com/videos). Once you have configured the project and have tested the deployment successfully you can also add a create/deploy release step to Jenkins for after the build succeeds, but you do need to create and configure your project and step/s first.

Please let me know if you have any further questions or run into any more issues.

Vanessa