Ejemplo n.º 1
0
        public ActionResult SaveHostsStep(HostsDeploymentStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditHostsStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.UpdateHostsFile);

            deploymentStep.SetStringProperty("ConfigurationJson", model.ConfigJson);
            deploymentStep.SetStringProperty("Step.Title", model.StepTitle);

            this.SaveRoles(model, deploymentStep);

            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }
Ejemplo n.º 2
0
        public ActionResult SaveSQLStep(SqlScriptDeploymentStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditSqlScriptStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.RunSQLScript);

            deploymentStep.SetStringProperty("Step.Title", model.StepTitle);
            deploymentStep.SetStringProperty("Command", model.Command);
            deploymentStep.SetStringProperty("ConnectionString", model.ConnectionString);

            this.SaveRoles(model, deploymentStep);

            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }
Ejemplo n.º 3
0
        public ActionResult SaveDacpacStep(DacpacDeploymentStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditDacpacStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.DeployDacpac);

            deploymentStep.SetStringProperty("Step.Title", model.StepTitle);
            deploymentStep.SetStringProperty("ConnectionString", model.ConnectionString);
            deploymentStep.SetStringProperty("TargetDatabase", model.TargetDatabase);
            deploymentStep.SetStringProperty("CustomConfiguration", model.CustomConfiguration);
            deploymentStep.SetStringProperty("ProjectId", model.ProjectId.ToString());

            this.UpdateProjectReference(model);
            this.SaveRoles(model, deploymentStep);
            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }
Ejemplo n.º 4
0
        public ActionResult SaveRunVsTestsStep(RunVsTestStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditRunTestStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.RunVsTests);

            deploymentStep.SetStringProperty("Step.Title", model.StepTitle);
            deploymentStep.SetStringProperty("FiltersJson", model.FiltersJson);
            deploymentStep.SetStringProperty("StopOnFailure", model.StopOnFailure.ToString());
            deploymentStep.SetStringProperty("ProjectId", model.ProjectId.ToString(CultureInfo.InvariantCulture));

            this.UpdateProjectReference(model);

            this.SaveRoles(model, deploymentStep);

            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }
Ejemplo n.º 5
0
        public ActionResult SaveZipArchiveStep(ZipArchiveDeploymentStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditZipArchiveStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.CopyFiles);

            deploymentStep.SetStringProperty("Step.Title", model.StepTitle);
            deploymentStep.SetStringProperty("DestinationPath", model.Destination);
            deploymentStep.SetStringProperty("CustomConfiguration", model.CustomConfigurationJson);
            deploymentStep.SetStringProperty("ProjectId", model.ProjectId.ToString(CultureInfo.InvariantCulture));

            this.UpdateProjectReference(model);

            this.SaveRoles(model, deploymentStep);

            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }
Ejemplo n.º 6
0
        public ActionResult SaveWebSiteStep(WebSiteDeploymentStepModel model)
        {
            this.CheckPermission(UserRoleAction.DeploymentChangeSteps);

            if (!this.ModelState.IsValid)
            {
                return(this.View("EditWebsiteStep", model));
            }

            DeploymentStep deploymentStep = this.GetDeploymentStep(model, DeploymentStepType.DeployWebSite);

            deploymentStep.SetStringProperty("IIS.SiteName", model.SiteName);
            deploymentStep.SetStringProperty("IIS.DestinationPath", model.Destination);
            deploymentStep.SetStringProperty("IIS.Bindings", model.BindingsJson);
            deploymentStep.SetStringProperty("ProjectId", model.ProjectId.ToString());

            this.UpdateProjectReference(model);

            this.SaveRoles(model, deploymentStep);

            this.Entities.SaveChanges();

            return(this.RedirectToAction("VersionDeployment", "Bundles", new { id = deploymentStep.BundleVersionId }));
        }