Beispiel #1
0
        public ActionResult UpdateState(string versionNumber, ReleaseCandidateState state)
        {
            var candidate = DocumentSession.GetCandidate(versionNumber);

            candidate.UpdateState(state);
            return(new EmptyResult());
        }
Beispiel #2
0
        public ActionResult Edit(string versionNumber, ReleaseCandidateState state)
        {
            var candidate = DocumentSession.GetCandidate(versionNumber);

            candidate.UpdateState(state);
            return(RedirectToAction("Index"));
        }
Beispiel #3
0
        public ActionResult MarkAsDeployed(string versionNumber, string environment, bool success)
        {
            var candidate = DocumentSession.GetCandidate(versionNumber);
            var env       = DocumentSession.GetEnvironment(environment);

            candidate.MarkAsDeployed(success, env);
            return(new EmptyResult());
        }
Beispiel #4
0
        public ActionResult Details(string versionNumber)
        {
            var    candidate        = DocumentSession.GetCandidate(versionNumber);
            string releaseNotesText = "";
            var    notesAttachment  = DocumentSession.Advanced.DatabaseCommands.GetAttachment(versionNumber.MakeCustomDocumentKey("release-notes.txt"));

            if (notesAttachment != null)
            {
                using (var stream = notesAttachment.Data())
                {
                    releaseNotesText = new StreamReader(stream).ReadToEnd();
                }
            }
            return(View(new ReleaseCandidateViewModel
            {
                Candidate = candidate,
                ReleaseNotes = FormatReleaseNotesForHtml(releaseNotesText)
            }));
        }
Beispiel #5
0
        public ActionResult Edit(string versionNumber)
        {
            var candidate = DocumentSession.GetCandidate(versionNumber);

            return(View(candidate));
        }