1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/harbormaster
James Rhodes ca8f7cdaa5 Execute commands under Powershell on Windows for Harbormaster
Summary:
Resolves T5831.  This modifies the Drydock SSH interface to execute commands under Powershell when the target host platform is Windows.  Powershell is far more featured than cmd.exe, and more closely resembles a UNIX shell.

Currently Powershell outputs stderr as an XML blob on a line, and while this code currently doesn't use that, it will allow us in the future (planned next week) to redirect that output to the stderr log instead of having it all merged in with stdout under cmd (where there is no way to distinguish it).

Test Plan:
Ran various native commands and PowerShell commands from a Harbormaster build, including things like:

```
Write-Host ("my test" + ${build.id})
```

and saw:

```
my test679
```

in the output.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5831

Differential Revision: https://secure.phabricator.com/D10248
2014-08-13 12:48:52 +10:00
..
application Rename policy capabilities 2014-07-25 08:20:39 +10:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
conduit Rename Conduit classes 2014-07-25 10:54:15 +10:00
config Migrate "Run Command" to use Drydock hosts 2013-12-05 14:06:22 +11:00
controller Measure how long build targets take in Harbormaster 2014-08-12 08:34:43 +10:00
customfield Allow Harbormaster build targets to wait for messages 2014-04-16 13:01:46 -07:00
editor Modularize mail tags 2014-08-12 12:28:41 -07:00
engine Implement artifact release for Harbormaster 2014-08-12 09:15:16 +10:00
event Implement showing buildable status in Diffusion 2014-06-14 02:28:00 +10:00
exception Allow build steps to explicitly fail the build 2014-08-01 08:08:28 +10:00
interface Move build variables into HarbormasterBuildableInterface 2014-06-20 12:58:23 +10:00
management Give Buildables a status, populate it, and return it over Conduit 2014-04-17 16:01:16 -07:00
phid Implement build simulation; convert Harbormaster to be purely dependency based 2014-07-31 11:39:49 +10:00
query Use tabs on build targets and allow build steps to have a description 2014-08-01 08:09:15 +10:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
step Execute commands under Powershell on Windows for Harbormaster 2014-08-13 12:48:52 +10:00
storage Implement artifact release for Harbormaster 2014-08-12 09:15:16 +10:00
typeahead Implement build simulation; convert Harbormaster to be purely dependency based 2014-07-31 11:39:49 +10:00
view Replace some hsprintf() by phutil_tag() 2013-11-11 09:23:23 -08:00
worker Measure how long build targets take in Harbormaster 2014-08-12 08:34:43 +10:00