I want to access the username of a manual intervention step in one deployment in a custom script step in another deployment (to a different environment).
One option might be to go via the REST API, but this would require an API key which seems a bit long-winded when I’m already logged in.
Is there any reference documentation of the powershell cmdlets we can use in custom script steps in addition to e.g. set-octopusvariable and new-octopusartifact ?
Unfortunately there is no native way that we provide access to variables from one deployment, while in the context of another deployment. You will need to use the API to call the server to get these details.
As for powershell cmdlets you have almost much summarized everything that we include in the script bootstrapper.
Our aim with these cmdlets are to just provide the essentials to allow users to get their job done without bundling unecessary code.
Let me know if there is any further information you are after to help get your deployment set up.
For the record, I have solved this using an artifact to communicate between deployments. One script to create a specific artifact, another script (using the API) that checks for the existence of the artifact.
This makes sense, since a release is (and should be) immutable - except for artifacts.
Glad to hear that you got this sorted out. Let us know if there are any other issues you encounter with your deployment.