mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
7c3cb5948c
Summary: This adds a Drydock blueprint for preallocated, remote hosts. This will be used by the Harbormaster interface to allow users to specify remote hosts that builds can be run on. This adds a `canAllocateResource` method to Drydock blueprints; it is used to detect whether a blueprint can allocate a resource for the given type and attributes. Test Plan: Ran: ``` bin/drydock lease --type host --attributes remote=true,preallocated=true,host=192.168.56.101,port=22,user=james,keyfile=,path=C:\\Build\\,platform=windows ``` and saw the "C:\Build\<id>" folder appear on the remote Windows machine. Viewed the lease and resource in Drydock as well. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran, jamesr Maniphest Tasks: T4111 Differential Revision: https://secure.phabricator.com/D7593
26 lines
702 B
PHP
Executable file
26 lines
702 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
$root = dirname(dirname(dirname(__FILE__)));
|
|
require_once $root.'/scripts/__init_script__.php';
|
|
|
|
$args = new PhutilArgumentParser($argv);
|
|
$args->setTagline('manage drydock software resources');
|
|
$args->setSynopsis(<<<EOSYNOPSIS
|
|
**drydock** __commmand__ [__options__]
|
|
Manage Drydock stuff. NEW AND EXPERIMENTAL.
|
|
|
|
EOSYNOPSIS
|
|
);
|
|
$args->parseStandardArguments();
|
|
|
|
$workflows = array(
|
|
new DrydockManagementWaitForLeaseWorkflow(),
|
|
new DrydockManagementLeaseWorkflow(),
|
|
new DrydockManagementCloseWorkflow(),
|
|
new DrydockManagementReleaseWorkflow(),
|
|
new DrydockManagementCreateResourceWorkflow(),
|
|
new PhutilHelpArgumentWorkflow(),
|
|
);
|
|
|
|
$args->parseWorkflows($workflows);
|