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!

    [BM] Bug with variables get from a list at build level

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 9 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.
    • P Offline
      philippe.camelio_3885
      last edited by philippe.camelio_3885

      Hello

      I may have found a nice bug 🙄

      From i small pipeline, I ran a test script which only display 2 variables.
      The goal is to concatenate the value of these values to a third one like a docker container and "version"

      I assign values at the Build step

      • One from a text field
      • One from a
        ** a text
        ** a list

      And I display the results,
      ${VAR1}:${VAR2}

      If VAR2 is select from a text, I have got what expected
      c2c79f97-83cd-4bfd-8798-ca8afa71b221-image.png

      If I select VAR2 from a list :
      9706f53b-950b-4a17-9bd0-2ee14527df71-image.png

      The carriage return is added and mess up the final variable

      Here are the Pipeline used and the script

      {
        "Name": "TEST",
        "Description": "Just creates a blank pipeline where that can add stages, approvals, etc., to as you need.",
        "Stages": [
          {
            "Name": "STEP 1",
            "Description": "",
            "Targets": [
              {
                "ScriptId": "TEST",
                "ServerNames": [
                  "LOCALHOST"
                ],
                "ServerRoleNames": [],
                "DefaultServerContext": 1
              }
            ],
            "Gate": {
              "UserApprovals": [],
              "GroupApprovals": [],
              "DeploymentWindows": [],
              "AutomatedChecks": {
                "Issues": {
                  "Statuses": []
                }
              },
              "AutomaticApprovals": []
            },
            "AllowMultipleActiveBuilds": false
          },
          {
            "Name": "STEP 2",
            "Description": "",
            "Targets": [],
            "Gate": {
              "UserApprovals": [],
              "GroupApprovals": [],
              "DeploymentWindows": [],
              "AutomatedChecks": {
                "Issues": {
                  "Statuses": []
                }
              },
              "AutomaticApprovals": []
            },
            "AllowMultipleActiveBuilds": false
          }
        ],
        "TemplateVariables": [
          {
            "Name": "VAR1",
            "Description": "",
            "InitialValue": "list1",
            "Required": true,
            "Type": "List",
            "Usage": "Build",
            "PipelineStageNames": [],
            "ListValues": [
              "list1\r",
              "list2"
            ]
          },
          {
            "Name": "VAR2",
            "Description": "",
            "InitialValue": "var2",
            "Required": true,
            "Type": "Text",
            "Usage": "Build",
            "PipelineStageNames": [],
            "ListValues": []
          }
        ],
        "EventListeners": [
          {
            "Event": 5,
            "PipelineStageNames": [],
            "Type": "DeployReleaseEventListener"
          },
          {
            "Event": 5,
            "PipelineStageNames": [],
            "Type": "CreateReleaseEventListener"
          }
        ]
      }
      

      Script TEST

      Log-Information ${VAR1};
      Log-Information ${VAR2};
      Log-Information ${VAR1}:${VAR2};
      

      Best tests
      PhilippeC.

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        philippe.camelio_3885 @philippe.camelio_3885
        last edited by

        [UPDATE]
        The bug can be overcome using $trim function

        1 Reply Last reply Reply Quote 0
        • rhessingerR Offline
          rhessinger inedo-engineer
          last edited by

          Hi @philippe-camelio_3885,

          Thanks for finding this and providing a work around. I have added a ticket, BM-3915, to fix this issue. It should be released within the next couple of versions of BuildMaster.

          Thanks,
          Rich

          Products Engineer, Inedo

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            philippe.camelio_3885 @rhessinger
            last edited by

            @rhessinger
            👍

            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