Clone Runbook to new project using API / Client

I’m currently working on a process to clone a runbook from one project to another, and I can’t seem to get it working with the rest api and/or client libraries. I am currently running 2019.10.11, but I haven’t seen anywhere in the release notes that this feature has been added since.

Is there currently a way to do this? We have the need to have similar runbooks across many projects, but setting them up manually takes too long.

HI Chris,

Sorry about the late response. At this time we don’t support cloning Runbook across projects through our UI.

However this is possible using the client library. We’ve created a LINQPad script which you can find here - https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/Octopus.Client/LINQPad/CloneRunbookAcrossProjects.linq

Please be aware that the script linked above only copies the name, description and Runbook process. However any referenced variables, tenants or settings and etc, are not cloned.

However this would give you a starting point for your use case.

Regards,
Ankith

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