コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
ファイル: FileModule.cs プロジェクト: madddmax/Galaxy
        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);
        }
コード例 #4
0
        public void Handle(ConfigSampleReceived message)
        {
            var deployment = _board.GetDeployment(message.DeploymentId);

            deployment.ConfigSample = message.Sample;
            _board.SaveDeployment(deployment);
        }