Skip to content

Instantly share code, notes, and snippets.

@DamianMac
Created October 27, 2014 11:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamianMac/ceae61309794f36a6b78 to your computer and use it in GitHub Desktop.
Save DamianMac/ceae61309794f36a6b78 to your computer and use it in GitHub Desktop.
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