public static Deployment DeployRelease(this IOctopusSession session, Release release, DeploymentEnvironment environment, bool forceRedeploymentOfExistingPackages = false) { var deployment = new Deployment(); deployment.EnvironmentId = environment.Id; deployment.ReleaseId = release.Id; deployment.ForceRedeployment = forceRedeploymentOfExistingPackages; return(session.Create(release.Link("Deployments"), deployment)); }
public static Release CreateRelease(this IOctopusSession session, Project project, IList <SelectedPackage> latestVersions, string version, string releaseNotes) { var release = new Release(); release.Assembled = DateTimeOffset.UtcNow; release.AssembledBy = Environment.UserName; release.Version = version; release.SelectedPackages = latestVersions.ToArray(); release.ReleaseNotes = releaseNotes ?? string.Empty; return(session.Create(project.Link("Releases"), release)); }