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!

Set Buildmaster variable from artifactory query



  • We need to set a Buildmaster variable based on the contents of a file in artifactory. E.g. the Buildmaster Release number is 9.4.0 and the 4th digit latest build number comes from text file in artifactory which is created by our Jenkinw build jobs.

    This would create the full VERSION_NUMBER (9.4.0.109) needs by subsequent Buildmaster actions.

    Using the Artifactory pluging we can retrieve the file containing the latest build number, but how can we set a Buildmaster variable ?



  • Pulling in a variable value from an external source would require a custom action using the BuildMaster SDK. These are relatively easy to write, but we can of course help with that through professional services (http://inedo.com/company/professional-services).

    In the action's overridden Execute() method, all you'd need to do is:

    this.Context.Variables["VERSION_NUMBER"] = GetVariableValue();

    where GetVariableValue() is a method you create to pull the value from whatever source you want (could be from Artifactory, or something like File.ReadAllText())



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation