I have a map defined in my application settings as
{
"TestMap": "%(val1: foo, val2: bar)"
}
and I have a basic plan
for server MyTestServer
{
set $test = $MapItem(%TestMap, val1);
Execute-PowerShell >>
$test;
echo $test;
>>;
}
But upon execution I am getting the following stack trace.
Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Inedo.Extensions.VariableFunctions.Maps.MapItemVariableFunction.Evaluate(IGenericBuildMasterContext context)
at Inedo.BuildMaster.BuildMasterVariableEvaluationContext.TryEvaluateFunction(RuntimeVariableName functionName, IList`1 arguments)
at Inedo.ExecutionEngine.Variables.FunctionTextValue.Evaluate(IVariableEvaluationContext context)
at Inedo.ExecutionEngine.Variables.ProcessedString.Evaluate(IVariableEvaluationContext context)
at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.DeploymentPlanExecuter.EvaluateExpressionAsync(String expression, IExecuterContext context)
at Inedo.ExecutionEngine.Executer.ExecuterThread.<EvaluateExpressionAsync>d__73.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Inedo.ExecutionEngine.Executer.ExecuterThread.<ExecuteAsync>d__50.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Inedo.ExecutionEngine.Executer.ExecuterThread.<ExecuteNextAsync>d__34.MoveNext()
What is the correct way to define and access a map?
Product: BuildMaster
Version: 5.5.3