forked from lix-project/hydra
hydra: buildmachine disabled by default, add some default constraints
This commit is contained in:
parent
ef1efa80e4
commit
a391c78aaf
|
@ -146,14 +146,15 @@ sub create_machine_submit : Chained('admin') PathPart('create-machine/submit') A
|
|||
|
||||
requireAdmin($c);
|
||||
|
||||
my $hostname = trim $c->request->params->{"hostname"};
|
||||
my $hostname = trim $c->request->params->{"hostname"};
|
||||
error($c, "Invalid or empty hostname.") if $hostname eq "";
|
||||
|
||||
txn_do($c->model('DB')->schema, sub {
|
||||
my $machine = $c->model('DB::BuildMachines')->create(
|
||||
{ hostname => $hostname });
|
||||
updateMachine($c, $machine);
|
||||
updateMachine($c, $machine);
|
||||
});
|
||||
saveNixMachines($c);
|
||||
$c->res->redirect("/admin/machines");
|
||||
}
|
||||
|
||||
|
|
|
@ -487,12 +487,12 @@ create table NewsItems (
|
|||
|
||||
create table BuildMachines (
|
||||
hostname text primary key NOT NULL,
|
||||
username text NOT NULL,
|
||||
ssh_key text NOT NULL,
|
||||
options text NOT NULL,
|
||||
username text DEFAULT '' NOT NULL,
|
||||
ssh_key text DEFAULT '' NOT NULL,
|
||||
options text DEFAULT '' NOT NULL,
|
||||
maxconcurrent integer DEFAULT 2 NOT NULL,
|
||||
speedfactor integer DEFAULT 1 NOT NULL,
|
||||
enabled integer DEFAULT 1 NOT NULL
|
||||
enabled integer DEFAULT 0 NOT NULL
|
||||
);
|
||||
|
||||
create table BuildMachineSystemTypes (
|
||||
|
|
Loading…
Reference in a new issue