We are attempting to create a project step via the Octopus API to our self-hosted Octopus instance. Using the SDK & PowerShell, we are attempting to add an action to a step within a project. The Step & its configuration is all being set correctly however the step is based on a custom step template that need’s a package reference.
We are able to add the Octopus.Client.Model.PackageReferenceCollection Package to the action to commit to the step in code. Once the deployment process object gets committed back to the server, the Octopus.Client.Model.PackageReferenceCollection configuration is missing. We believe this is to do with the Packages Property & likely the API endpoint only accepting {get;} rather then {get;set;} methods.
If this is the case, what is the prefer or required method of setting a package reference against a project step action?
A current manual workaround to get the config to set in Octopus is to update the ActionTemplate that is referenced in the step, once you update the step to use the latest version, the Octopus UI will set the require package config we are attempting to set. It seems either the UI is making the correct call or has the required method to set this config.
Many thanks
Octopus Version: v2021.1 (Build 7236)