Dynamically selected Package ID is not automatically deploying

I’ve been following the guide found here: https://octopus.com/docs/deployment-process/deploying-packages/dynamically-selecting-packages

I have 3 packages pushed to the Octopus Package Repository:

  • MyTool.Dev
  • MyTool.Staging
  • MyTool.Production

In my Process I have a simple “Deploy A Package” step. I supply the Package id as #{PackageID}

In my Variables I have the PackageID setup with 3 values:

  • MyTool.Dev - No Scope
  • MyTool.Staging - Staging (Environment)
  • MyTool.Production - Production (Environment)

My Lifecycle consists of 3 Phases:

  • Dev - Auto
    • Automatically Deploys to Dev
  • Staging
    • Deploys to Staging (Manual)
  • Production
    • Deploys to Production (Manual)

My Channel is defaulted to this Lifecycle and under Triggers “Automatic Release Creation” chooses the Default Channel and selects my one and only Package Step.

Now if I create a Release manually everything works as expected. The problem is, as I understand it, Octopus should automatically create a new release based on the Package that was received to its Repository.

Since the unscoped PackageID is defaulted to MyTool.Dev I would expect that as soon as a new package was received for that ID, then Dev - Auto should get triggered and deployed.

What am I missing in this setup?

Thanks,
Jensen

Hi Jensen,

Thanks for getting in touch! Unfortunately you’re just simply hitting a limitation with automatic release creation (ARC). When using a variable for the package ID, ARC isn’t able to automatically resolve the variable to create a release with. There’s a fairly popular UserVoice item which you may want to contribute some votes/comments to!

What I’d suggest is to create your release in a different way. Besides manually creating it, you could possibly create the release using the create-release command if you’re using Octo.exe or a build server extension (which uses Octo.exe under the hood). Would this help in your setup?

Sorry it’s not better news! Don’t hesitate to reach out if you have any further questions going forward. :slight_smile:

Kind regards,

Kenny

Thanks Kenneth,

I ended up using a suggestion similar to yours, but instead used the REST API to accomplish the creation of a new Release.

For anyone finding this problem in the future I did use the suggestion from here: https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki#use-your-developer-tools to record the API calls and create a script from that investigation.

Cheers,
Jensen

Hi Jensen,

Thanks for following up! That’s great to hear you reached a solution, and thanks for sharing. Don’t hesitate to reach out anytime if you have any further questions. :slight_smile:

Best regards,

Kenny

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