Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    actionsbuildmastervariables
    2 Posts 1 Posters 3 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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 ?

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        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())

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation