Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. scusson_9923
    S
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    scusson_9923

    @scusson_9923

    0
    Reputation
    67
    Posts
    14
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    scusson_9923 Follow

    Best posts made by scusson_9923

    This user hasn't posted anything yet.

    Latest posts made by scusson_9923

    • RE: Using curl to either check or download a script file in Otter

      Hello,

      Great news!

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Using curl to either check or download a script file in Otter

      Hi Steve,

      scriptExists does come back as false. But my main point is that the job is marked as failure regardless. Odd that I see 'INFO: Execution run succeeded' in a job failure. I assume that this message indicates that the process itself did not experience any "internal errors"?

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Using curl to either check or download a script file in Otter

      Hi Steve,

      Unfortunately, I still get 'ERROR: The raft Default does not contain an asset of type Script with the name FooBar.ps1.'

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Using curl to either check or download a script file in Otter

      Hello Dean,

      Here is a test script:

      try
      {
          Get-Asset FooBar.ps1
          (
              Overwrite: true,
              Type: Script,
              To: D:\temp\FooBar.ps1
          );
      }
      catch
      {
          Log-Information did we catch?;
      }
      

      Here is the Otter output:

      DEBUG: Beginning execution run...
      INFO: Execution run succeeded.
      DEBUG: Beginning execution run...
      INFO: Execution run succeeded.
      DEBUG: Beginning execution run...
      INFO: Execution run succeeded.
      DEBUG: Beginning execution run...
      INFO: Execution run succeeded.
      DEBUG: Job will be run against servers sequentially (not asynchronously).
      DEBUG: Targeting servers: Otter host <host>
      INFO: did we catch?
      INFO: did we catch?
      ERROR: The raft Default does not contain an asset of type Script with the name FooBar.ps1.
      DEBUG: Cleaning up temporary files on Local Server...
      

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Using curl to either check or download a script file in Otter

      Hello Alana,

      I tried that, but the catch returns as error if the file doesn't exist and fails the job.

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Using curl to either check or download a script file in Otter

      Hello Alana,

      We want to add to our current functionality and make it backward compatible. We have an archive job running in Jenkins which then uploads a config file to Otter and triggers a job. That Otter job runs remotely using Otter\PowerShell scripts with that config file and an input. What we want to do is have a related archive job with its own config file use the same Otter\PowerShell scripts. The issue is, we cannot guarantee that both config files will exist. It would help greatly if we can conditionally get an asset.

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • Using curl to either check or download a script file in Otter

      Hi,

      I am trying to conditionally run Get-Asset in an Otter script based on the existence of a script in the default raft. I am using curl and regardless if the script is there or not, I always get a positive return. Example (foo.config does not exist):

      curl.exe --head "https://<server_url>/0x44/Otter.WebApplication/Inedo.Otter.WebApplication.Pages.Scripts.ListScriptsPage/DownloadAsset?id=Default::BinaryFile::<path_to_script>/foo.config"
      HTTP/1.1 302 Found

      How can I either conditionally run Get-Asset or use curl to check for a script in the raft?

      Thanks,
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Otterscript: Usage of Success exit code or EXEC operation - clarifications

      Hi Alana,

      This seems to work for what I am trying to accomplish.

      Thanks!

      Scott

      posted in Support
      S
      scusson_9923
    • RE: Otterscript: Usage of Success exit code or EXEC operation - clarifications

      Hi Alana,

      What I am trying to do is capture the result (success or fail) of this call:

      InedoCore::Exec
      (
          FileName: pwsh,
          WorkingDirectory: C:\,
          Arguments: test.ps1,
          ErrorOutputLogLevel: Error,
          OutputLogLevel: Information,
          SuccessExitCode: == 0
      );
      

      My understanding is that currently InedoCore::Exec does not have a return value. I was hoping for something like:

      $ret = InedoCore::Exec
      (
       ...
      );
      
      if $ret == "0"
      {
          // do operations for success
      }
      else
      {
         // do operations for failure
      }
      

      Thanks!
      Scott

      posted in Support
      S
      scusson_9923
    • RE: Otterscript: Usage of Success exit code or EXEC operation - clarifications

      Any updates on this?

      Thanks!
      Scott

      posted in Support
      S
      scusson_9923