Hi,
My customer has a requirement that I do auto-deploy of some software before they come to work in the morning. I though I would do this using a scheduled task that runs a powershell, which calls web api methods in octopus. If you have a better idea, please tell me =)
Problem is; my octopus project has some input params that a user normally supplies before deploy. How on earth can I do this via script instead?
I have tried using Fiddler to test this:
Verb:POST
Header: X-Octopus-ApiKey:xxx
Url: http://octopus-server/api/deployments
Request body: {“ReleaseId”:“Releases-xxx”, “EnvironmentId”:“Environments-xx”, “Comments”:“testing auto deploy”, “FormValues”:{“Some_parameter_name”:“some value”}}
I have also tried posting the parameters in all sorts of ways I can think of (as an array, as values directly in the body, using parameter caption instead of parameter name etc etc), but I only get:
ErrorMessage": “There was a problem with your request.”, “Errors”: [
“Please provide a value for the following variables: Caption for some parameter\r\nOnce you have corrected these problems you can try again.\r\nIf the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.\r\nIf the problem is related to the deployment process you will need to create a new release for the changes to take effect.”
Could you please give me a hint on how to do this correctly?
Regards
-Gard Ellefsen
(Using version 3.1.3)