public function updateDeployment($deploymentID)
{
$deployment = \DNDeployment::get()->byId($deploymentID);
$deployment->EnvironmentID = $this->environment->ID;
$deployment->SHA = $this->getOption('sha');
$deployment->RefType = $this->getOption('ref_type');
$deployment->RefName = $this->getOption('ref_name');
$deployment->Summary = $this->getOption('summary');
$deployment->Title = $this->getOption('title');
$deployment->Strategy = $this->toJSON();
$deployment->DeployerID = \Member::currentUserID();
$deployment->write();
// re-get and return the deployment so we have the correct state
return \DNDeployment::get()->byId($deployment->ID);
}