Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var server = "http://yourserveraddress:8065/"; //Your server and IP address
var apiKey = "API-XXXXXXXXXXXXXXXXXXXXXXXXX"; // Get this from your 'profile' page in the Octopus web portal
var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);
var deployment = repository.Deployments.Get("deployments-774");
var newDeployment = new Octopus.Client.Model.DeploymentResource();
newDeployment.EnvironmentId = deployment.EnvironmentId;
newDeployment.ProjectId = deployment.ProjectId;
newDeployment.ReleaseId = deployment.ReleaseId;
var result = repository.Deployments.Create(newDeployment);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment