Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Configuration File Text Templating



  • The Inedo documentation for BuildMaster states that the perferred method for configuration file management is text templates but gives no examples. I understand the underlying concept but am not sure how to implement. I am looking for the best way to implement and was hoping someone could share their solution to this problem.

    I could set environment level variables in pipeline view or during runtime and then execute find and replace statements on the file itself but this seems extremely overbearing and complex as it would blow up my script and require a lot of maintenance.

    I could also create my own powershell script that takes environment level variables as params and updates placeholders in the file in one shot. This again seems overbearing as adding a new variable values would require me to edit the PS script every time.

    I would prefer to just "update" the configuration file template as part of the package creation and still be able to use the configuration module in buildmaster.

    Again if anyone has a solution for this, I'd love to hear about it.

    Product: BuildMaster
    Version: 5.6.11



  • There used to be an example in there... not sure what happened to it.

    Anyway, there is an equivalent example in the Otter documentation: https://inedo.com/support/documentation/otter/reference/templating

    Note the Apply-Template operation handles all the replacements / captures all configuration variables by default, while also allowing for other values to be injected if necessary.



  • I am on BuildMaster version 5.6.11, and I am getting an error:

    Unknown operation "Apply-Template"

    Is this otter command available in BuildMaster? If so, which version do I need to upgrade to in order to get access to this?


  • inedo-engineer

    This was introduced into 5.8; so please update to the latest v5.

    https://inedo.com/buildmaster/5.8



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation