Jenkins create-release - Octopus package ID?

Hello,
I am trying to trigger an Octopus deploy from Jenkins.

  • I have pushed the package file using the Octo push cmd,
  • I have created the release using the create-release and
  • Octopus is triggered so I have created 1 project with only 1 test step-process (check health) and it has been triggered.
    I would like now to know how to extract stuff from the package (zip), but the problem I am facing is that I cannot know the package name because it could be different each time I build from Jenkins.
    Is there a way to send variables during the build process in Jenkins to Octopus?
    Ex: branch name, dev name, package name or ID?
    Sorry if you find this a dummy question, but I am quite new to Octopus.
    Best regards.
    L.

@Lucio_Falco1 Just asking a few things to clarify, I do Jenkins Created releases and deployments on octo packed items every 30 mins or so to a slew of machines.

  1. Where did you push the package to?
    1.a OctoServer or a Nuget Repository?
  2. Have you thought about breaking the jenkins jobs into a two step system?

An example of the two step system would be ‘Build_Job’ builds the package and pushes it to the location. It sets an output variable in jenkins of the package name and version.
The second jenkins job that would be done as a ‘downstream’ job “Deploy_Job” takes a parameter of what package is being pushed and then uses that in the script part of the jenkins job.

Hello @asantaferra
Thank you for the reply.
I’m pushing the package to the octopus server.
Yes I have thinked about it, but still I need to figure out how to select the uploaded package along with the release in automation.
Do you know how to pass this information to Octopus server?
Thank you indeed.
Regards.
L.

You can do this from octo.exe command line. If you specifically setup a variable that is needed as part of the process you can find it here: https://octopus.com/docs/api-and-integration/octo.exe-command-line/creating-releases

Apologies for delay. I am just turning on notifications for when I get replies.

the key section to look at on the docs page is this blob:

-v, --variable=VALUE [Optional] Values for any prompted variables in
the format Label:Value. For JSON values,
embedded quotation marks should be escaped with
a backslash.

Hi @Lucio_Falco1,

Could I just check what the name of the package file you’re pushing to Octopus is? The packages in the Octopus feed use SemVer, so I’d expect it to be something like foo.1.0.0.zip?

So that name would be for PackageID=foo having Version=1.0.0.

Also, how are you trying to get to the package and its content on the Octopus step? A “deploy a package” step should let you select the PackageID from the feed and unpack it onto the target for you, so you can then get to the content for the version tied to the release.

Thank you @asantaferra, it’s exactly what I was looking for.
Bes Regards.
L.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.