Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. jharbison
    3. Posts

    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!

    J Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 18
    • Posts 31
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Proper script to create Map variable

      You mean something like this?

      set %ImAnEmptyMap = %();
      set %RectangleProperties = %(Sides:4,Color:blue,Coordinates:%(x:10,y:15),Environments:@(Dev, QA, Prod));
      

      https://inedo.com/support/documentation/otter/reference/otter-script/formal-grammar

      The formal definition of a map

      one of:
      
      • a variable_expression for a map (%) type, or a
      • a % character followed by left-parens ((), and any number of key-values pairs delimeted with commas (,), followed by a right-parens ()). A key-value pair consists of any_name, followed by a colon (:), followed by a literal_expression

      Also yes you can create a map variable in the pipeline variables.

      posted in Support
      J
      jharbison
    • Raise Error Syntax

      I'm looking to trigger a deployment failure at the beginning of a plan if a user-provided variable isn't valid. Based on the documentation here https://inedo.com/support/documentation/buildmaster/execution-engine/statements-and-blocks/other-statements it looks like there is a raise error command for this purpose however I can't seem to find any documentation on how to use it. What is the proper way to trigger a fatal error in a plan?

      Product: BuildMaster
      Version: 5.6.8

      posted in Support buildmaster documentation error example
      J
      jharbison
    • Release Template Package Variables Missing

      Package variables defined in a release template are not populated when creating a package from 'Packages'->'Create Release Package' (localhost:82/applications/7/packages). This results in a "Could not resolve variable" error during plan execution. The variables do populate when going through the release overview and clicking 'Create Package' (localhost:82/applications/7/releases/release?releaseNumber=1.9.0).

      Product: BuildMaster
      Version: 5.6.8

      posted in Support buildmaster bug packages
      J
      jharbison
    • Recursive Variable Evaluation

      Is there a way to have variable expansion inside of another variable? It would be nice to be able to build up variables using other variables that are fully evaluated during execution.

      {
        "CommonPath": "\common\path",
        "SpecificPath1": "$CommonPath\specific\place\here",
        "SpecificPath2": "$CommonPath\another\place\there"
      }
      
      Log-Information $SpecificPath2;
      
      INFO:  \common\path\another\place\there
      

      Product: BuildMaster
      Version: 5.6.8

      posted in Support variables buildmaster
      J
      jharbison
    • Execute-PowerShell Throws Exception

      After updating from 5.5.3 to 5.6.2, plans utilizing the "Execute-PowerShell" command throw the following exception.

         Unhandled exception: System.MissingMethodException: Method not found: 'System.Nullable`1<Inedo.ExecutionEngine.RuntimeValue> Inedo.BuildMaster.Extensibility.Operations.IOperationExecutionContext.TryGetVariableValue(Inedo.ExecutionEngine.RuntimeVariableName)'.
         at Inedo.Extensions.Windows.PowerShell.PowerShellScriptRunner.ExtractVariables(String script, IOperationExecutionContext context)
         at Inedo.Extensions.Windows.Operations.PSExecuteOperation.<ExecuteAsync>d__16.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.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.DeploymentPlanExecuter.<Inedo-ExecutionEngine-Executer-IExecutionHostEnvironment-ExecuteActionAsync>d__21.MoveNext()
      

      I rolled back to 5.5.3 and verified my plans were working again and incrementally updated versions. It looks like the problem started occurring in 5.6.0

      Product: BuildMaster
      Version: 5.6.2

      posted in Support powershell buildmaster
      J
      jharbison
    • Exception Accessing MapItem

      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

      posted in Support buildmaster variables
      J
      jharbison
    • Inline PSExec Variable Evaluation

      Can someone verify if the following behaviors are intended when writing scripts directly inside a PSExec operation?

      1. Runtime variables are not evaluated when quoted.
      2. Runtime variables are evaluated to empty when the script text is a single line.

      I've created a small plan that illustrates the behavior.

      ##AH:UseTextMode
      template foobar
      {
          # General
          for server MyServer
          {
              set $var1 = foo;
      
              set $var2 = bar;
      
              Execute-PowerShell echo '$var1\$var2\test';
      
              Execute-PowerShell >>echo '$var1';
      echo '$var2';
      echo '$var1\$var2\test';>>;
      
              Execute-PowerShell echo $var1\$var2\test;
      
              Execute-PowerShell >>echo $var1;
      echo $var2;
      echo $var1\$var2\test;>>;
      
              Execute-PowerShell >>echo $var1;
      echo $var2;
      echo '$var1\$var2\test';>>;
      
              Execute-PowerShell >>echo '$var1';
      echo '$var2';
      echo $var1\$var2\test;>>;
          }
      }
      

      Also can someone provide a clear example of defining and accessing the inner values of a List type and a Map type variable? I see there is a ListItem function and a MapItem function but I am having trouble successfully using them.

      Finally, is there any way to search the Q&A knowledge base other than tags? I'm sure this variable question has been asked before but the tag search seems pretty limited.

      Product: BuildMaster
      Version: 5.5.3

      posted in Support buildmaster variables
      J
      jharbison
    • Parallel Loop Block

      Is it possible to have each iteration of a loop block run in parallel? I know the general block can run statements in parallel but most of my build steps that can benefit from parallelism also benefit from being in a loop. i.e. applying database scripts

      Product: BuildMaster
      Version: 5.5.3

      posted in Support buildmaster workflows
      J
      jharbison
    • RE: Subversion "Get Latest Source" Error on Windows Inedo Agent

      Thank you for the quick turnaround. However, I am still receiving an error due to a file not found. After upgrading extensions, the log now shows that the following path is trying to be hit:

      Executing C:\BuildMaster\_SVCTMP\ExtTemp\Subversion\Resources\svn.exe
      

      This path exists on the server hosting BuildMaster but does not exist on the agent server.

      posted in Support
      J
      jharbison
    • RE: Subversion "Get Latest Source" Error on Windows Inedo Agent

      Which configuration is this exactly? When creating a new Subversion source control provider I do not see any property for executable path.

      In addition I turned on the "Log command line arguments" option and found the following in the action log.

      Executing C:\ProgramData\InedoAgent\BuildMaster\Temp\ExtTemp\Subversion\Resources\svn.exe
      

      Your thought was correct and this path does not exist on the remote agent but there is a similar path at:

      C:\ProgramData\InedoAgent\BuildMaster\ExtensionsTemp\Subversion\Resources\svn.exe

      Is the Subversion extension supposed to be using the second path?

      posted in Support
      J
      jharbison
    • Subversion "Get Latest Source" Error on Windows Inedo Agent

      I am trying to create a simple plan that pulls the latest source code from a Subversion repository then runs MSBuild to compile the code before packing everything up in an artifact to be delivered to the next stage in the pipeline. When I set this plan to run under the "Local" agent on the machine hosting my instance of BuildMaster it works fine. However, when I change the plan to run on a remote Windows 7 machine that has an "Inedo" agent installed I receive the following stack trace:

      Getting latest source code from path "/internaltools/"...
      Ensuring local workspace at: C:\ProgramData\InedoAgent\BuildMaster\Temp\SrcRepos\qasubversion_81_svn_repos-internaltools_branches_2.4_2.4.0
      Workspace already exists.
      Updating local workspace...
      Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Inedo.Agents.InedoAgentClientBase.<SendMessageAsync>d__28.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.Agents.InedoAgentClientBase.<ExecuteCommandAsync>d__26`1.MoveNext()
         --- End of inner exception stack trace ---
         at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
         at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
         at Inedo.Agents.InedoAgentClient.RemoteProcess.get_ExitCode()
         at Inedo.BuildMaster.Extensibility.Providers.ProviderBase.ExecuteCommandLine(RemoteProcessStartInfo startInfo)
         at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.ExecuteSvn(String commandName, SvnArguments args, Boolean logErrors) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 249
         at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.UpdateLocalWorkspace(SvnSourceControlContext context) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 320
         at Inedo.BuildMasterExtensions.Subversion.Subversion15Provider.GetLatest(SvnSourceControlContext context, String targetDirectory) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E60664\Src\Extension\Subversion15Provider.cs:line 85
         at Inedo.BuildMaster.Extensibility.Operations.SourceControl.GetLatestOperation.ExecuteAsync(IOperationExecutionContext context)
         at Inedo.BuildMaster.Windows.ServiceApplication.Executions.PlanExecuter.DeploymentPlanExecuter.<Inedo-ExecutionEngine-Executer-IExecutionHostEnvironment-ExecuteActionAsync>d__20.MoveNext()
      ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
         at Inedo.Agents.InedoAgentClientBase.<SendMessageAsync>d__28.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.Agents.InedoAgentClientBase.<ExecuteCommandAsync>d__26`1.MoveNext()<---
      Cleaning up...
      Deleting C:\ProgramData\InedoAgent\BuildMaster\Temp\_E14 on QASCM0Build1...
      C:\ProgramData\InedoAgent\BuildMaster\Temp\_E14 on QASCM0Build1 deleted.
      Cleanup complete.
      

      Product: BuildMaster
      Version: 5.2.1

      posted in Support agents subversion buildmaster
      J
      jharbison
    • 1 / 1