How to pass the DeployedBy username from Jenkins(who has triggered the build) to octopus deployment manager using Octo.exe

Hi All,

I am looking for the way to pass the username(Who has triggered the build in Jenkins) to Octopus deployment manager using Octo.exe.

i am using the below command line argument to deploy the package to Test and looking for the way to show the username in Octopus deployment manager web interface.

E:\Octopus\OctopusTools\Octo.exe create-release --deployto Dev --project RMS --version %BUILD_ID% --packageversion %BUILD_ID% --server http://usgdc8k29.rdigest.com/octopus --apiKey API-[My API key] --user=%BUILD_USER_FIRST_NAME% --progress

Please let me know which argument i need to pass to show the username(Deployed by) in octopus web interface.
Thanks,
Ganesh

Hi Ganesh,

Thanks for reaching out. If you just want the name of the Jenkins user to show up on the web interface, i’d recommend you to add his name on the release notes. It will show up on the web interface as shown on the attached screenshot

To pass a value for the release notes, use the –releasenotes parameter when calling *Octo.exe create-release * and pass in the Jenkins variable that holds the user name.

Hope that helps!

Dalmiro

Hi Dalmiro,

Thanks for your updates and it is very helpful. I am able to show the username in Release notes section.

But i am looking for the option to show the username in" History - Who" Section.

I have attached the screen shot for your reference. Please help me to solve this problem.

Thanks in advance,
Ganesh

Hi Ganu,

The field you are marking references who started the deployment, which in this case is dictated by the API key used to create the release. To do what you ask you’re gonna have to create an API key for each user and use the correct API key depending on the user that triggers the build/deployment.

Thanks!

Dalmiro

Thanks so much Dalmiro.