Deploy comments

I’m using the C# client to create a deployment and I noticed there was a comments property, but when I set it then look at the deployment in the UI I can’t find the commenta anywhere. I also can’t find a corresponding spot in the UI to add a comment when creating a deployment. Any help will be much appreciated.

I have 2 questions

  1. Where can I view these comments
  2. Is their a way to enter comments though the UI?

Below is the code I’m using

var deployment = new DeploymentResource
{
ReleaseId = release.Id,
EnvironmentId = environment.Id,
Comments = comment
};

await repositoryForSpace.Deployments.Create(deployment);

Hi @jweems,

Thanks for reaching out.

While there is a field for comments, unfortunately they currently aren’t utilized so it’s a bit misleading.

I’m sorry I don’t have better news for you. When you’re creating the release, could you put your comments in the release notes there?

Please let me know what you think.

Thanks,
Jeremy

Unfortunately release note comments won’t work for this. We use CI to build every check-in but only deploy to our test environments at set times every day. I’m working on a process to automate those deployments as well as provide a user interface for our testers to be able to request out of cycle deployments. I was hoping I could use the comments field to capture who requested and who approved out of cycle deployments as well as indicate if a deployment was an automated one. I can store this elsewhere but for convenience and audit purposes I was hoping Octopus could be our source of truth. Is enabling deploy comments on the roadmap? If not is there anything I can do to at lest start the consideration process?

Hi @jweems,

I can definitely ask our product team about the comments part of that code, but in the meantime there’s a possible solution.

Depending on what you mean by out of cycle, you could have a script step that sets an output variable based on your out of cycle logic. Then you would have a conditional manual intervention step based on that output variable directly after that, which would have fields that fulfill the data you want. This information is put in additional fields in the audit log.

Do you think that’s something that could work for your use case?

Please let me know what you think.

Thanks,
Jeremy

I appreciate the suggestion, for now I’ll just add logging to my process and use deployment IDs to link everything together. It’s not as clean as having it all in Octopus, which is something I would still really like to have, but it should still keep the auditors happy.

I believe the Comments property is a vestige of a feature that was present in Octopus a long time ago.

It was superceded by prompted variables (as Paul explains in this issue). If you create a prompted variable, it will allow you to capture text with each deployment, and use it however you wish. As an example, you could log it with a highlight level, causing it to be displayed prominently in the task log.

Do you think prompted variables meet your needs?

Yes I was able to get a prompted variable to work for what I needed, I appreciate the suggestion.
For anyone else comes across this thread, I added a 1 line PowerShell step that uses Write-Highlight to display the variable. That looks like it will work really well and since it’s running in parallel with the former first step I don’t think it’s going to add any time to the deploy.

Hi @jweems,

Thanks for letting us know you got it going and for also updating the thread with your solution.

Please let us know if you have any other questions or concerns. I hope you have a great rest of your week.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.