/// <summary> /// Creates a release for the specified project in OctopusDeploy /// </summary> /// <param name="projectName">The target project name</param> /// <param name="settings">The settings</param> public void CreateRelease(string projectName, CreateReleaseSettings settings) { if (projectName == null) { throw new ArgumentNullException(nameof(projectName)); } if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (string.IsNullOrEmpty(settings.Server)) { throw new ArgumentException("No server specified.", nameof(settings)); } if (string.IsNullOrEmpty(settings.ApiKey)) { throw new ArgumentException("No API key specified.", nameof(settings)); } var argumentBuilder = new CreateReleaseArgumentBuilder(projectName, settings, Environment); Run(settings, argumentBuilder.Get()); }
/// <summary> /// Creates a release for the specified project in OctopusDeploy /// </summary> /// <param name="projectName">The target project name</param> /// <param name="settings">The settings</param> public void CreateRelease(string projectName, CreateReleaseSettings settings) { if (projectName == null) { throw new ArgumentNullException("projectName"); } if (settings == null) { throw new ArgumentNullException("settings"); } if (string.IsNullOrEmpty(settings.Server)) { throw new ArgumentNullException("server"); } if (string.IsNullOrEmpty(settings.ApiKey)) { throw new ArgumentNullException("apiKey"); } var argumentBuilder = new CreateReleaseArgumentBuilder(projectName, settings, _environment); Run(settings, argumentBuilder.Get(), settings.ToolPath); }