Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. jharbison
    3. Posts
    J
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by jharbison

    • Proper way to use $PSEval with boolean operations?

      I am trying to use $PSEval to do some simple boolean comparisons but I'm not having any luck. If I run a simple plan like

      set $foo = true;
      set $bar = true;
      set $foobar = $PSEval($foo -and $bar);
      

      then I get an execution error that I cannot assign a vector value to a scalar variable. If I change $foobar to a vector (@foobar) and print out its contents it's just an empty array. Currently I've created a powershell asset to do the operation and return the result but it is a bit verbose to write

        PSCall GLOBAL::BooleanOperation
      (
          var1: $foo,
          var2: $bar,
          operator: and,
          returnValue => $foobar
      );
      

      so I was hoping there was a more "inline" way to accomplish this.

      Product: BuildMaster
      Version: 6.1.1

      posted in Support
      J
      jharbison
    • Legacy Build Triggers

      I just wanted to make a post to express that I think it is a shame to see the Schedule Triggers functionality be officially deprecated. Although it is clear that the feature is rooted in legacy code, what with its use of VariableDeclarations, it still provides unique functionality that cannot be easily replaced with webhooks or repository monitors. With the ability to trigger plans on a cron-like schedule, my team has been able to setup regularly recurring jobs to perform things such as nightly cleanups of the build servers and turning off virtual machines in the cloud when not in use.

      I realize that just because a feature has become legacy doesn't mean my team can't use it and I also realize that my usecase for this feature is against its original purpose but I think with a bit of refactoring the idea of scheduled tasks would be a great stand alone feature for BuildMaster.

      I also wanted to post this to see if there were any other users who were using this feature to run scheduled jobs.

      Product: BuildMaster
      Version: 6.1.0

      posted in Support
      J
      jharbison
    • RE: Error iterating list of strings

      I just recreated this. It appears that when only a single item is selected from the list the variable is created as a scalar(string) rather than a vector(list). This behavior is similar to Powershell's array unrolling so I don't know if this behavior is by design or if it is a bug. I was going to suggest a work around using the optional parameter of $IsVariableDefined to determine if the variable is currently a string or a list but it seems that function does not behave as expected as it returns true for me regardless of the variable's type. It wouldn't be pretty but I guess you could wrap your logic in a try/catch and attempt the logic again but treating the variable as scalar. Something like

      try
      {
          Log-Information The first item is @MyVariable[0];
      }
      catch
      {
          Log-Debug Failure accessing MyVariable. Trying as a scalar.;
          Log-Information The first item is $MyVariable;
      }
      posted in Support
      J
      jharbison
    • RE: Start Service does not seem to raise error in Try/Catch Block

      This was added to the Stop-Service operation back in April. It's simple enough to add it to the Start-Service operation. I've opened a pull request here.

      posted in Support
      J
      jharbison
    • RE: Why the task 'Write Assembly Version' does not take revision as part of version?

      The WriteAssemblyInfoVersions operation is part of Inedo's WindowsSDK extension. They have all of their extensions hosted open source on GitHub. You can see here that this operation is using the System.Version constructor. The documentation notes that a FormatException will be thrown if any component of the version does not parse to an integer so specifying '*' as the revision explains the error you are seeing.

      As for how to get an incrementing revision number, usually this would be your $PackageNumber. By default if you don't specify a version to the operation it will fallback to $ReleaseNumber.$PackageNumber. For a brand new release with a single package this would look like 0.0.0.1 by default. However, if you are perhaps redeploying a package multiple times and need to distinguish between them you could use the $ExecutionId.

      posted in Support
      J
      jharbison
    • +1 for BM-3239

      I just wanted to make a post to express my interest in BM-3239, that would allow users to dynamically specify a plan or module to invoke, and see if there is any additional interest from the community. I think with this operation we could get some really powerful flexibility in our workflows. This operation would let us create "wrappers" for our call statements that could do some pretty cool stuff. For example we could more easily aggregate the runtime of specific steps.

      module InvokePlanTimerWrapper<$PlanName, %PlanArguments>
      {
          set $StartTime = $PSEval(Get-Date);
      
          Invoke-Plan $PlanName
          (
              Name: $PlanName,
              Arguments: %PlanArguments
          );
      
          set $EndTime = $PSEval(Get-Date);
      
          set $script = >>
              `$start = [datetime]"$StartTime"
              `$end = [datetime]"$EndTime"
              (New-TimeSpan -Start `$start -End `$end).seconds
          >>;
         
          set $Diff = $PSEval($script);
      
          Log-Information Plan $PlanName took $Diff seconds to complete.;
      }
      

      We could also create a form of retry logic that doesn't rerun steps that already succeeded.

      module InvokePlanReexecuteWrapper<$PlanName, %PlanArguments>
      {
      
          set %ExecutedSteps = %PackageVariable(ExecutedSteps);
          set @ExecutedStepsForEnvironment = @MapItem(%ExecutedSteps, $EnvironmentName);
      
          if $IsReexecution && $ListIndexOf(@ExecutedStepsForEnvironment, $PlanName) == -1
          {
              Invoke-Plan $PlanName
              (
                  Name: $PlanName,
                  Arguments: %PlanArguments
              );
          
              set @ExecutedStepsForEnvironment = @ListInsert(@ExecutedStepsForEnvironment, $PlanName);
              set %ExecutedSteps = %MapRemove(%ExecutedSteps, $EnvironmentName);
              set %ExecutedSteps = %MapAdd(%ExecutedSteps, $EnvironmentName, @ExecutedStepsForEnvironment);
          
              Set-ReleaseVariable(
                  Variable: ExecutedSteps,
                  Value: %ExecutedSteps,
                  Release: $ReleaseNumber,
                  Package: $PackageNumber
              );
          }
      }
      

      Product: BuildMaster
      Version: 6.0.10

      posted in Support
      J
      jharbison
    • RE: Send Email on Plan Changes for BuildMaster

      Short answer, I don't think there is a straight forward way to accomplish what you want, currently. However, if you absolutely needed to implement something like this you could technically achieve it but there are few obstacles. Take this all with a grain of salt as I'm no BuildMaster expert.

      First, the only two eventlistener types that support all event types are "Publish Event Details", like you saw, and also "Execute Command Line". Neither of these are particularly well suited for sending a simple email, for reasons below, so ideally you would create a custom eventlistener. However, I don't believe the InedoSDK has any interfaces for creating our own. So we have to choose between the two eventlistener types available.

      If we go with the "Publish Event Details" listener, we would have to create some type of service to listen for the publish from BuildMaster. This service would consume the POST body and then send the email that you want.

      The other option is to use the "Execute Command Line" listener. This option would require less overhead as you could just write a small batch script that sends an email. You can checkout this answer on StackOverflow for an example. However, we find there's an additional problem with using this approach. The "Execute Command Line" listener doesn't pass the event details to the executable. We have no way of telling what plan was modified.

      Of course there's also a way around this if you have access to the database. In your script you could query the [BuildMaster].[dbo].[EventOccurences] table for the latest Plan Modified event (Event_Code=PLNMOD) and join that with the [BuildMaster].[dbo].[EventOccurenceDetails] table to see what plan was modified.

      However with that all said and done, the specific event you want to listen to, Plan Modified, wouldn't actually work in v6.0.4 of BuildMaster, as it appears the [dbo].[Plans_UpdatePlan] stored procedure is not actually raising the Plan Modified event.

      So in the end that was a pretty long winded way to say that I agree that there should be a "generic" send email event listener that can attach to any event and that I would +1 that as a feature request.

      posted in Support
      J
      jharbison
    • RE: Error in Global Template not caught in local plan

      I agree. I think intuitively, the throw statement should allow a message to be specified but Write-Error works all the same I guess.

      posted in Support
      J
      jharbison
    • RE: Knowing what plans are used where

      I think one approach you could take would be to utilize the Native API which, using your example, could be found at https://example.com/reference/api. You could call the Pipelines_GetPipelines endpoint, filter by "Active_Indicator" == true, then parse the "Pipeline_Configuration" xml for each pipeline looking for the "PlanName" attribute of the "Properties" element under the "Inedo.BuildMaster.Pipelines.PipelineStageTarget" elements. Here's a snippet of the "Pipeline_Configuration" I get back when I run this, to get a better idea.

      <Inedo.BuildMaster.Pipelines.Pipeline Assembly="BuildMaster">
      <Properties Name="All" Color="#499e8d" Description="The pipeline that deploys to all environments on all stacks.  " EnforceStageSequence="False">
      	<Stages>
      		<Inedo.BuildMaster.Pipelines.PipelineStage Assembly="BuildMaster">
      			<Properties Name="Build" TargetExecutionMode="Parallel" AutoPromote="False">
      				<Targets>
      					<Inedo.BuildMaster.Pipelines.PipelineStageTarget Assembly="BuildMaster">
      						<Properties PlanName="Main-Build" EnvironmentName="BuildFarm" DefaultServerContext="None">
      							<ServerNames />
      							<ServerRoleNames />
      						</Properties>
      					</Inedo.BuildMaster.Pipelines.PipelineStageTarget>
      				</Targets>
      

      From this you can see I have a Pipeline named "All" that has a stage named "Build" that calls the plan "Main-Build".

      posted in Support
      J
      jharbison
    • RE: Error in Global Template not caught in local plan

      From the formal specification:

      Log Statement
      This statement has two elements:

      Log Message – an expression
      Log Level – an integer enum with valid values of (0=Debug, 10=Information, 20=Warning, 30=Error)
      When this statement is encountered, the execution engine writes the specified message to the specified level. If Warning or Error is specified, the execution status will change appropriately (Error causes Failing, Warning causes Warning unless already Failing), but an error will not be raised.

      I think you can accomplish what you want if you use Execute-Powershell instead of Log-Error.

      Execute-Powershell >> Write-Error "Hello World">>;
      posted in Support
      J
      jharbison
    • Are Package Notes Supported?

      What is the state of the concept of Package Notes mentioned here, https://inedo.com/support/documentation/buildmaster/modeling-applications/release-notes? Is this feature deprecated and the documentation is lagging a bit or is this feature simply not implemented at this time? When creating a note, there is a drop down for selecting a package but the value shows up as (none) when editing a note. Looking at the stored procedure, [dbo].[Releases_CreateOrUpdateReleaseNote] the BuildNumber passed in is never used.

      The specific use-case I'm looking to use package specific notes for is to log the change history and commit message that triggered the creation of a package. Currently these are being added as release-wide notes but given the number of packages being created for each release, this has become unmanageable. If the note could be made for each package individually then the release overview screen wouldn't become cluttered.

      Of course I'm also open to hearing any alternative solutions to tying the history and commit message to a specific package.

      Product: BuildMaster
      Version: 6.0.4

      posted in Support
      J
      jharbison
    • RE: Create new server in Otter using API

      I believe your url should look like https://<my server's URL>/api/infrastructure/servers/create/<server name>?key=<my api key>

      posted in Support
      J
      jharbison
    • [Feature Request] Set-ReleaseVariable support all types

      It looks like the new Set-ReleaseVariable operation only handles scalar variables. Given that release and package variables can be all types, would it be possible for this operation to handle vector and map types as well?

      Product: BuildMaster
      Version: 6.0.2

      posted in Support
      J
      jharbison
    • Variables in Descriptions

      Is it possible to evaluate a variable in a statement block's description? I believe the answer is no but I wanted to make sure. I'm looking to organize my execution logs a bit better but without access to the variables I have to use generic descriptions such as

      foreach $database in @DatabasesToUpdate
      {
          #Update Database
          {
              <Step 1>
              <Step 2>
              <Step 3>
              ...
              ...
          }
      }
      

      which results in multiple, identical "Update Database" blocks in the execution log. I have to then dig deeper into each block to determine which database was updated. Ideally I could do something like the following.

      foreach $database in @DatabasesToUpdate
      {
          #Update Database - $database
          {
              <Step 1>
              <Step 2>
              <Step 3>
              ...
              ...
          }
      }
      

      which would evaluate to "Update Database - AdventureWorks" in the execution log.

      Product: BuildMaster
      Version: 5.8.3

      posted in Support
      J
      jharbison
    • Call Operation with Dynamic Options

      Is it possible to somehow call an operation with optional parameters without specifying the optional parameter names explicitly? Ideally I would like to be able to call an operation and pass in a map that contains the parameters. This would allow me to do something like the following where in reality %configuration is read in from an application variable that the user has access to change.

      set %configuration = %{To: somebody, Subject: something important, Text: some text};
      call Send-Email(%configuration);
      

      Instead I have to know all optional parameters that might be set ahead of time resulting in something like

      set set %configuration = %{To: somebody, Subject: something important, Text: some text};
      call Send-Email(
      To: $MapItem(%configuration, To),
      Subject: $MapItem(%configuration, Subject),
      Text: $MapItem(%configuration, Text)
      );
      

      This is fine for simple operations but when dealing with something like IIS::Ensure-AppPool that has over 40 parameters it quickly gets out of hand when different users need to specify a different subset of parameters. Currently all users need to specify all parameters with defaults even if they specifically only care about a couple.

      Product: BuildMaster
      Version: 5.6.8

      posted in Support
      J
      jharbison
    • RE: Variable as Lock Token

      That operation looks exactly like what I am trying to achieve. What is the behavior when all of the servers in the pool have been acquired? Does current execution wait or does an error get thrown?

      posted in Support
      J
      jharbison
    • RE: Variable as Lock Token

      That is unfortunate. I had intended to use locks to emulate server pools in a sense, in order to prevent builds from running on top of each other. I have multiple build servers that can build multiple different applications in parallel. However, each build server can only have one instance of an application's build running at a time. If a new build request comes in for an application but that application is already building on all of the servers the build needs to be queued up. With variable lock tockens I was hoping I could do something like the following to create a global lock tocken based on a combination of the build server to use and the current application being built.

      set $BuildServer = '';
      call ReturnRandomBuildServer(returnServer => $BuildServer);
      set $LockTocken = $Eval($BuildServer)_$Eval($ApplicationName);
      
      with lock = !$LockTocken
      {
      
      }
      posted in Support
      J
      jharbison
    • Variable as Lock Token

      Is it possible to use the value of a variable as a lock tocken? Based on the grammar it looks like the lock tocken needs to be hardcoded so it is known during execution. If it is possible can someone provide an example? Simply doing something like

      with lock = $LockToken
      {
      
      }
      

      gives a processing error when attempting to save the plan.

      There were one or more errors processing your script:
      [Error] Line 2: Expected {
      

      Product: BuildMaster
      Version: 5.6.8

      posted in Support
      J
      jharbison
    • Retrieve All Release Variables for a Given Release

      Does anyone know of a way to pull back all release variables attached to a specific release? I am looking to automatically create a new release for an application by essentially "cloning" an existing release. Currently I can create a new "target" release using the same template and pipeline as a specified "source" release. However, now I am trying to copy release variables from the "source" to the "target" and am having trouble finding any entry points to reach this data. I can't seem to find any documented functions, operators, release api endpoints, or native api endpoints that will return the release variables. It doesn't even look like there are any stored procedures in the database that return this information meaning my only option is to directly read from the dbo.ReleaseVariables table which I would assume is highly discouraged. Hopefully I am just overlooking some bit of documentation and someone can point me in the right direction.

      Product: BuildMaster
      Version: 5.6.8

      posted in Support
      J
      jharbison
    • Feature Request - Specify Release Template When Using Release API

      I am looking to automatically create a new release using the "Create Release" endpoint (/api/releases/create). Unfortunately, it does not look like that endpoint supports specifying a release template although the JSON Native API (Releases_CreateOrUpdateRelease) does support it. For now I am just using the Native API but given the sentiment that the Native API is not guaranteed to have the same stability as the Release API it would be nice if the same functionality could be brought over to the newer API.

      Furthermore, it seems that a Pipeline_Id is required in order to use the Releases_CreateOrUpdateRelease call which is somewhat unintuitive since a template is meant to specify the pipeline used by a release. A newly created release will have the pipeline specified by the Pipeline_Id instead of the tempale's pipeline. To get around this before creating the new release I first have to make a call to ReleaseTemplates_GetTemplateByName. Then I parse the ReleaseTemplate_Configuration that is returned for the Pipeline attribute. Next, I have to make a call to Pipelines_GetPipelines and compare the results to find the matching Pipeline_Name before finally getting the correct Pipeline_Id to pass into Releases_CreateOrUpdateRelease. It would be nice if either the Pipelin_Id parameter was optional or the template's pipleline took precedent.

      Product: BuildMaster
      Version: 5.6.8

      posted in Support
      J
      jharbison
    • 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
      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
      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
      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
      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
      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
      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
      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
      J
      jharbison
    • 1 / 1