Hello, I am working on a project to deploy Java application to Linux using Octopus. One key point is to get NuGet package with automatic versioning from Jenkins server. The Jenkins server runs on Windows.
I’d like to know if someone has experience to share to get versioned NuGet package for Jenkins Java application build.
I know there is one Jenkins NuGet plugin. But it is for .NET project build.
You could use this docs page as a guide, but instead of using OctoPack use Octo.exe to pack the output of your build into a NuGet package and then push that to Octopus.
I’m not that familiar with Java web applications anymore (haven’t done Java since university), but I’ll attempt to give you some further guidance.
Your build process should produce some build outputs of your web app and put those in a folder on the filesystem, you can use Octo.exe to pack those files into a NuGet package that you can then push to Octopus. Octo.exe does not need a .nuspec file, it just packs all the files in the folder as-is.
For exampl: octo.exe pack --id={YourPackageName} --basePath={JenkinsBuildOutputPath} --outFolder={PathToWhereYouWantThePackage} --version={JenkinsBuildNumber}