I hereby claim:
- I am damianmac on github.
- I am damianm (https://keybase.io/damianm) on keybase.
- I have a public key whose fingerprint is 67AF B8C1 EAD1 A004 1018 5FD4 275B 9389 C485 BF68
To claim this, I am signing this object:
$server = "http://blah" | |
$apiKey = "API-XXXXXXXXXXXXXXXX" | |
$command = $($server + "/api/tasks") | |
$task = @{} | |
$task.Name = "Backup" | |
$task.Description = "Backup requested via API" | |
$body = $task | ConvertTo-Json |
var deployment = repository.Deployments.FindOne(d => d.EnvironmentId == "Environments-65" && d.ProjectId == "projects-193"); |
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(); |
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 task = new Octopus.Client.Model.TaskResource(); | |
task.Name = "AdHocScript"; | |
task.Description = "Script invoked via API"; |
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 projectId = "projects-225"; //your project id | |
//This pulls out the info you need, the same call that's made on the Create Release page in the UI | |
var template = repository.Client.Get<Octopus.Client.Model.ReleaseTemplateResource>("/api/deploymentprocesses/deploymentprocess-" + projectId + "/template"); |
#create share and set permissions | |
New-Item -ItemType Directory $sharePathname | |
$inherit = [system.security.accesscontrol.InheritanceFlags]"ContainerInherit, ObjectInherit" | |
$propagation = [system.security.accesscontrol.PropagationFlags]"None" | |
$permission = 'IIS_IUSRS',"FullControl", $inherit, $propagation, "Allow" | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission |
var upgrader = | |
DeployChanges.To | |
.SqlDatabase(connectionString) | |
.JournalTo(new NullJournal()) //means the execution won't get logged, so each script is run each time | |
.WithScriptsFromFileSystem("D:\\mystoredprocs\\") | |
.LogToConsole() | |
.Build(); | |
var result = upgrader.PerformUpgrade(); |
$octopusServerUri = "http://serveraddress" | |
$octopusApiKey = "API-APIKEY" | |
$projectId = "projects-1" | |
$filePath = "D:\photos\picture.jpg" | |
Write-Verbose "Attempting to push a new logo" | |
$logoUri = "$octopusServerUri/api/projects/$projectID/logo?apikey=$octopusApiKey" | |
Write-Host $logoUri |
I hereby claim:
To claim this, I am signing this object:
$server = " http://yourserver/" #your octopus server | |
$apiKey = "API-YOURAPIKEY" #you'll need to generate an API | |
$command = $($server + "/api/projects") | |
$projects = Invoke-RestMethod -Method Get -Uri $command -Header @{"X-Octopus-ApiKey"=$apiKey} | |
$projects.Items | Format-Table Id, Name, lifecycleId | |
$command = $($server + "/api/lifecycles") |