OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

formvalues property of deployment resource is always empty #1983

Closed Dalmirog-zz closed 8 years ago

Dalmirog-zz commented 9 years ago

Even if the deployment had prompted values, when retrieving the resource from the API the formvalues property is always an empty collection: /api/deployments/Deployments-359

{
  "Id": "Deployments-359",
  "ReleaseId": "Releases-379",
  "EnvironmentId": "Environments-1",
  "ForcePackageDownload": false,
  "ForcePackageRedeployment": false,
  "SkipActions": [],
  "SpecificMachineIds": [],
  "DeploymentProcessId": "deploymentprocess-Projects-2-s-142-E5B7E",
  "ManifestVariableSetId": "variableset-Deployments-359",
  "TaskId": "ServerTasks-954",
  "ProjectId": "Projects-2",
  "UseGuidedFailure": false,
  "Comments": null,
  "FormValues": {},
  "QueueTime": null,
  "Name": "Deploy to Dev",
  "Created": "2015-09-10T18:19:53.324+00:00",
  "Links": {
    "Self": "/api/deployments/Deployments-359",
    "Release": "/api/releases/Releases-379",
    "Environment": "/api/environments/Environments-1",
    "Project": "/api/projects/Projects-2",
    "Task": "/api/tasks/ServerTasks-954",
    "Web": "/app#/deployments/Deployments-359",
    "Artifacts": "/api/artifacts?regarding=Deployments-359",
    "Variables": "/api/variables/variableset-Deployments-359",
    "Interruptions": "/api/interruptions?regarding=Deployments-359"
  }
}
zentron commented 8 years ago

For the time being I would recomend the user following the Variables link in the Deployment resource. In this case to /api/variables/variableset-Deployments-359. Where you can see the variables for that deployment including those provided in prompt.

...
    {
      "Id": "9d55dd42-49a4-b957-81a4-bf7565f0a1cc",
      "Name": "Blah",
      "Value": "I AM A BLAH!!",
      "Scope": { "Project": [ "Projects-2" ], "User": [ "True" ] },
      "IsSensitive": false,
      "IsEditable": false,
      "Prompt": {
        "Label": "Blah",
        "Description": "Tell me whats the blah?",
        "Required": false
      }
    },
    {
      "Id": "adf24afd-1902-4654-a8bb-18d302c45eea",
      "Name": "Octopus.Release.Previous.Id",
   ...

The alternative is to pull down and query the variables each time the deployment is requested which is more DB hits.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.