Saving scripts in a Source Control System (eg BitBucket)

I am putting a lot of custom scripts into Octopus Deploy to manage deployments and operations. I am getting to the point where I am thinking these scripts should be managed by a source control system.

I could use the git command line tool to get the latest version and run it, but then I have to worry about variable replacement and all the issues with trying to get the files via the git command line tool.

Alternatively I can just copy the latest version manually between the source control system and octopus deploy each time changes are made.

But both of those are a bit yucky.

I am wondering if Octopus has a way to help with this? I know it has an internal history tool, but looking at history in the Audit is very painful for scripts. (Script text is a huge block without line breaks and finding the script you are looking for among all the other events is hard .)

Does Octopus Deploy have a SVC integration tool to store my scripts in BitBucket?

Looks like this feature partially exists here: Deployment process as code - Octopus Deploy

It is not really what I was hoping for. Sending the data in packages means that you can’t see all the relevant information in Octopus Deploy when you are debugging deployments or runbooks.

Ideally, there would be a way to integrate a project with source control, where the scripts are committed to source control upon Saving.

But I can see that this is not the solution that was put in place. I will make do with what is there (or just keep using the scripts in Octopus).


Thanks for reaching out!

It seems you have found exactly what I was going to suggest, our latest ‘Deployment process as code’ feature. I’ve attached a blog post here outlining some of the design choices that were made during the shaping of this feature which might help clarify the best approach.

Custom scripts have a range of possible actions, such as logging and output variables which can be used to output practically any information you need. These are also available for scripts that are within a package. If you have any specific examples of some debugging information you would need that isn’t able to be retrieved, please let me know!

Best Regards,


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