One of our deployment templates is associated with a large number of project steps (650+). When the project steps were created, the default value for the parameter variable was used; however, I’m looking for a way to programatically change the value in the project steps.
After a little bit of digging I found the step’s action property (deployment process). After updating the property I can’t figure out how to save it. If I use the ‘modify’ method for the deployment process I get a 'Cannot find an overload for “Modify” and the argument count: “1” ’ error because the method is looking for type ‘DeploymentProcessResource’ but the deployment process object is type ‘DeploymentStepResource’.
Here’s a generic version of my code which hopefully shows what I’m trying to do:
$srvURI = ‘http:///’
$srvApiKey = ‘’
$ep = New-Object Octopus.Client.OctopusServerEndpoint $srvURI,$srvApiKey
$repo = New-Object Octopus.Client.OctopusRepository $ep
$prjObj = $repository.Projects.FindByName(‘myProject’) # get project obj
$depProc = $repository.DeploymentProcesses.Get($prjObj.DeploymentProcessId) # get project deployment process
$depProc.actions.properties[’’] = ‘’ # update deployment process action property to new value
$repo.DeploymentProcesses.Modify($depProc) # save deployment process
Any thoughts on what I’m missing?