Hi guys, I have a deployment that consists from one small script, that fetches some IIS properties of the site associated with my tenant.
And I want to return fetched info from this deployment to my C# client, which I use to start the deployment.
So I have C# client and there I prepare a deployment, get its task and wait for it to finish
var deploymentCreated = _repository.Deployments.Create(deployment);
var task = _repository.Tasks.Get(deploymentCreated.TaskId);
_repository.Tasks.WaitForCompletion(task);
var result = _repository.Tasks.GetDetails(task);
I created a variable called “result” in project, but I can’t see it’s value anywhere in my result object or task object.
My best guess was
var resultVariable = _repository.VariableSets.Get(deploymentCreated.ManifestVariableSetId).Variables.FirstOrDefault(v => v.Name == "result");
but it’s Value is null.
And here is how I am setting the variable value in the Octopus powershell script:
Set-OctopusVariable -name "result" -value "testresult"
Please help me, I’m in despair