Hello,
I am creating the package the release and the deploy using Octo.exe from a Jenkins configuration file.
In the Octo.exe pack instructions, I have filled in the property “Author” with my name.
How can I retrieve it in an Octopus?
ex: something like $OctopusParameters[“Octopus.Action.Package.PackageId”] but there is no “Author” field.
However Octopus does not expose the metadata of a package as a variable. There are two ways around this.
Thr first would be to use the Transfer a Package step to save the Nuget file to a known location, extract the package, and read the nuspec file. For example, if you had a package transfer step called Transfer Package, then the following Powershell script would extract the authors from the samplewebapp.nuspec file.
Alternatively if the authors used to build the nuget package are defined as variables from Jenkins, then you can can pass that same variable to Octopus. The Octo CLI create-release command accepts additional variables with the -variable=VALUE arguments. The documentation at https://octopus.com/docs/api-and-integration/octo.exe-command-line/creating-releases has more details. Passing the arguments directly is probably easier than extracting the package and parsing the nuspec file directly.