OctopusDeployAliases.

OctoCreateRelease(ICakeContext, string, CreateReleaseSettings) Method

Summary

Creates a release for the specified Octopus Deploy Project.

Syntax

[CakeMethodAlias]
public static void OctoCreateRelease(this ICakeContext context, string projectName, CreateReleaseSettings settings)

Examples

     // Minimum required
     OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings {
         Server = "http://octopus-deploy.example",
         ApiKey = "API-XXXXXXXXXXXXXXXXXXXX"
     });

     OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings {
         Server = "http://octopus-deploy.example",
         Username = "DeployUser",
         Password = "a-very-secure-password"
     });

     OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings {
         ConfigurationFile = @"C:\OctopusDeploy.config"
     });

     // Additional Options
     OctoCreateRelease(projectNameOnServer, new CreateReleaseSettings {
         ToolPath = "./tools/OctopusTools/Octo.exe"
         EnableDebugLogging = true,
         IgnoreSslErrors = true,
         EnableServiceMessages = true, // Enables teamcity services messages when logging
         ReleaseNumber = "1.8.2",
         DefaultPackageVersion = "1.0.0.0", // All packages in the release should be 1.0.0.0
         Packages = new Dictionary<string, string>
                     {
                         { "PackageOne", "1.0.2.3" },
                         { "PackageTwo", "5.2.3" }
                     },
         PackagesFolder = @"C:\MyOtherNuGetFeed",

         // One or the other
         ReleaseNotes = "Version 2.0 \n What a milestone we have ...",
         ReleaseNotesFile = "./ReleaseNotes.md",

         IgnoreExisting = true // if this release number already exists, ignore it
     });

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.

Parameters

Name Type Description
context ICakeContext The cake context.
projectName string The name of the project.
settings CreateReleaseSettings The settings.

Return Value

Type Description
void