public void Handle(DeployServiceEvent message) { var deployment = _deploymentBoard.GetDeployment(message.DeploymentId); deployment.PackageVersion = message.Version; _deploymentBoard.SaveDeployment(deployment); BuildAndProcess(message.DeploymentId, (d, f) => _builder.DeployServiceTask(d, f)); }
protected override object PostEdit(dynamic parameters) { var id = new ObjectId(parameters.id); var model = this.Bind <DeploymentEditModel>(); var deployment = _deploymentBoard.GetDeployment(id); model.Update(deployment); _deploymentBoard.SaveDeployment(deployment); return(RedirectToDetails(id)); }
private object RestoreBackup(dynamic parameters) { var id = new ObjectId(parameters.id); var deployment = _deploymentBoard.GetDeployment(id); string name = Request.Query.name; var backupFolder = deployment.GetBackupFolder(); var folder = Folder.Combine(backupFolder, name); var task = _taskBuilder.RestoreFromBackup(deployment, folder); task.Process(); return(string.Empty); }
public void Handle(ConfigSampleReceived message) { var deployment = _board.GetDeployment(message.DeploymentId); deployment.ConfigSample = message.Sample; _board.SaveDeployment(deployment); }