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
-
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
If I select VAR2 from a list :
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.
-
[UPDATE]
The bug can be overcome using $trim function
-
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
-