0

I'm using Jenkins with Octopus plugin to create Release in Octopus. This works nicely. However, when in Octopus, more specifically in my first 'Script' step, I can't get hold of the Release package. Only variable I seem to be able to get is:

$OctopusParameters["Octopus.Release.Number"]

What I need is original path for that same Release. My script step in powershell script unpacks nuget package, adds an extra level/folder, zips it, before deploying to an API. If I, in Octopus step, specify "Referenced package" (sourcepackage) then Jenkins will not build it's Post-Build step and complain that "sourcepackage" is missing. I would like to get original path for my package like this:

$OctopusParameters["Octopus.Action.Package[sourcepackage].OriginalPath"]

But I can't find a way without "Referenced package", and if I use it Jenkins will not build. :(

2 Answers2

0

I ended up doing a work around. I added Octopus variable "FeedPath" pointing to "D:\Octopus\Packages\Spaces-1\feeds-builtin[packagename]". In powershell I simply combined "FeedPath" with Release number to get full nuget file path:

$packagepath = $OctopusParameters["FeedPath"] + "[packagename]." + $OctopusParameters["Octopus.Release.Number"] + ".nupkg"
0

I've used the following to get the installation path for the package: Octopus.Action[Name of Process step].Output.Package.InstallationDirectoryPath. To get the compressed package prior to installation, I assume something similar can be used. Here is a link to the output variables: https://octopus.com/docs/projects/variables/output-variables

Jeremy Ray Brown
  • 1,499
  • 19
  • 23