public NancyPipelineRoutes(IPipeline pipeline, INotificationTarget notifier) { Post["/bitbucket"] = parameters => { string notificationString = Request.Form.Payload; var commitNotification = JsonConvert.DeserializeObject<BitbucketPostReceiveNotification>(notificationString); commitNotification.Commits.ForEach(c => pipeline.AddToPipeline(new Commit(c.Author, c.Message, c.Branch))); return "THANKS BITBUCKET"; }; Post["/jenkins"] = parameters => { var buildNotification = this.Bind<JenkinsBuildNotification>(); var buildStep = pipeline[buildNotification.Name]; if (buildNotification.Build.Phase == "STARTED") { buildStep.Start(); } else if (buildNotification.Build.Phase == "FINISHED") { if (buildNotification.Build.Status == "SUCCESS") { buildStep.Pass(); } else { buildStep.Fail(); } } return "THANKS FOR THE BUILD DEETS"; }; }