ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gnupg
<Query Kind="Program"> | |
<NuGetReference>Octokit</NuGetReference> | |
<Namespace>Octokit</Namespace> | |
<Namespace>System.Threading.Tasks</Namespace> | |
</Query> | |
static string product = "Octokit-LINQPad-2FA-Demo"; | |
IGitHubClient _Client = new GitHubClient(new ProductHeaderValue(product)); | |
string clientId = "client-id-of-your-registered-github-application"; | |
string clientSecret = "client-secret-of-your-registered-github-application"; |
$headers = @{"X-Octopus-ApiKey"="API-xxxxxxxxxxxxxxxxxxxxxxxxx"} | |
$environments = Invoke-RestMethod "http://url.to.octopus/api/environments/all" -Headers $headers -Method Get | |
$theEnvironment = $environments | ? { $_.Name -eq "TheEnvironmentName" } | |
$accounts = Invoke-RestMethod "http://url.to.octopus/api/accounts/all" -Headers $headers -Method Get | |
$theAccount = $accounts | ? { $_.Name -eq "TheAccount" } | |
$discovered = Invoke-RestMethod "http://url.to.octopus/api/machines/discover?host=hostnameoripaddress&type=Ssh" -Headers $headers -Method Get |
$deploymentJournalPath = Get-Item $env:TentacleJournal | |
if($deploymentJournalPath) { | |
$itemsToKeep = $null | |
$useItemsToKeep = [System.Int32]::TryParse($OctopusParameters["OctopusRetentionPolicyItemsToKeep"], [ref]$itemsToKeep) | |
if(-not $useItemsToKeep) { | |
Write-Host "Could not find the number of deployments to keep, ensure the lifecycle is set to keep a limited number of releases" | |
return | |
} | |
$projectId = $OctopusParameters["Octopus.Project.Id"] |
<YourOctopusUrl>
with the URL of your Octopus server.<YourOctopusVDirIfAnyOtherwiseJustBlank>
with the virtual directory you configured, otherwise remove it.<YourOctopusApiKey>
with your API Key, see How to create an API Key for instructions.<TheStepTemplateToFindAndUpdate>
with the name of the step template you want to update.Library -> Step Templates ->
` -> Usage and update all the projects that use the step template.# Step 1 - Run this on the Tentacle server to create the new Tentacle | |
$tentacleName = 'P1' | |
$tentaclePort = 10933 | |
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" create-instance --instance $tentacleName --config "C:\Octopus\$tentacleName\Tentacle-$tentacleName.config" | |
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" new-certificate --instance $tentacleName --if-blank | |
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance $tentacleName --reset-trust | |
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance $tentacleName --home "C:\Octopus\$tentacleName" --app "C:\Octopus\Applications\$tentacleName" --port $tentaclePort --noListen "True" | |
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" service --instance $tentacleName --install --start |
var octopusUrl = "http://octopus.url"; | |
var apiKey = "API-xxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
var octopusServer = new Octopus.Client.OctopusServerEndpoint(octopusUrl, apiKey); | |
var repo = new Octopus.Client.OctopusRepository(octopusServer); | |
var newLibraryVariableSet = new Octopus.Client.Model.LibraryVariableSetResource(); | |
newLibraryVariableSet.Name = "Skip Delta Compression"; | |
newLibraryVariableSet.Description = "Provides a shared variable set to skip delta compression that can be included on projects that shouldn't use it."; | |
var skipDeltaCompressionVariableSet = repo.LibraryVariableSets.Create(newLibraryVariableSet); |
I hereby claim:
To claim this, I am signing this object: