var tmp_editlink = document.getElementById('contenteditbtn').children[0];
tmp_editlink.href = tmp_editlink.href.replace('/azure-docs/','/azure-docs-pr/');
- Go to a docs page with an edit link
var tmp_editlink = document.getElementById('contenteditbtn').children[0];
tmp_editlink.href = tmp_editlink.href.replace('/azure-docs/','/azure-docs-pr/');
namespace Microsoft.VisualStudio.TestTools.UnitTesting | |
{ | |
public static class Asserṭ | |
{ | |
public static void AreEqual(Object expected, Object actual, params object[] parameters) { } | |
public static void AreEqual<T>(T expected, T actual, params object[] parameters) { } | |
public static void AreNotEqual(Object expected, Object actual, params object[] parameters) { } |
function Invoke-OctopusLogoUpload | |
{ | |
[CmdletBinding()] | |
PARAM | |
( | |
[string][parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$InFile, | |
[string]$ContentType, | |
[Uri][parameter(Mandatory = $true)][ValidateNotNullOrEmpty()]$Uri, | |
[string][parameter(Mandatory = $true)]$ApiKey | |
) |
{ | |
"Id": "ActionTemplates-41", | |
"Name": "Chain Deployment", | |
"Description": "Trigger a deployment for another project in Octopus", | |
"ActionType": "Octopus.Script", | |
"Version": 10, | |
"Properties": { | |
"Octopus.Action.Script.Syntax": "PowerShell", | |
"Octopus.Action.Script.ScriptSource": "Inline", | |
"Octopus.Action.Script.ScriptBody": "Write-Host \"**********\"\nWrite-Host \"Chained Deployment of '$Chain_ProjectName' version '$Chain_ReleaseNum' to '$Chain_DeployTo'.\"\nswitch ($Chain_CreateOption) {\n \"Try\" { Write-Host \" Release will be created if it doesn't exist.\" }\n \"Create\" { Write-Host \" Release will be created before deploying.\" }\n \"NoCreate\" { Write-Host \" Release will not be created and should already exist.\" }\n}\nWrite-Host \"**********\"\n\n$baseUri = $OctopusParameters['Octopus.Web.BaseUrl']\n$reqheaders = @{\"X-Octopus-ApiKey\" = $Chain_ApiKey }\n\n# Find Environment\n$environments = Invoke-WebRequest \"$baseUri/api/environments/all\" -Headers $reqheaders -UseBasic |
Function Get-OctopusEnvironmentMachines{ | |
Param( | |
[string]$EnvironmentName, #"App1 DEV" | |
[string]$APIKey, #API-XXXXXXXXXXXXXXXXXXXXXXXXX | |
[string]$OctopusBaseURI #http://octopus | |
) | |
try{ | |
$environmentsJSON=Invoke-WebRequest -URI "$OctopusBaseURI/api/environments" -Header @{ "X-Octopus-ApiKey" = $apiKey } -Method GET; | |
}catch{ | |
throw "Get-OctopusEnvironmentMachines: Failed to retrieve list of environments :: $_ " |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true,Position=1)] | |
[string]$OctopusUrl = "http://localhost:80", | |
[Parameter(Mandatory=$true,Position=2)] | |
[string]$ApiKey, | |
[Parameter(Mandatory=$false,Position=3)] | |
[switch]$Delete |
var OctoTool = { | |
GetEnvironmentMap: function(machineStatus) { | |
var machinesByEnv = angular.element($('.octo-group-body.machines')).scope().environments.map(function(el, i) { | |
var em = angular.element($('.octo-group-body.machines')).scope().machines[el.Id]; | |
return {EnvironmentId: el.Id, OnlineMachines: em ? em[machineStatus] : null} ; | |
}) | |
var values = {}; | |
for (var i=0; i<machinesByEnv.length; i++) { | |
values[machinesByEnv[i].EnvironmentId] = machinesByEnv[i].OnlineMachines; | |
} |
$octoBase = "http://octopusserver:port" | |
$apiKey = "API-XXXXXXXXXX" | |
Function GetFromOctopus([string]$relUrl) { | |
return Invoke-RestMethod -Uri "$octoBase$relUrl\?apiKey=$apiKey" -Method Get | |
} | |
$projects = GetFromOctopus -relUrl "/api/projects/all" | |
ForEach ($p in $projects.Items) { | |
$processLink = $p.Links.DeploymentProcess |
# Raven Export Script | |
# You'll need a copy of Raven.Abstractions.dll, Raven.Client.Lightweight.dll, | |
# Microsoft.CompilerServices.AsyncTargetingPack.Net4.dll, and Raven.Smuggler.exe in a lib folder | |
# under the location of this script. You can find them in the folder where Octopus Deploy is installed. | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$false,Position=1)] | |
[string]$exportPath = ".\dump.raven", |
# Raven Import Script | |
# You'll need a copy of Raven.Abstractions.dll, Raven.Client.Lightweight.dll, Jint.Raven.dll and Raven.Smuggler.exe | |
# in a lib folder (note: one more than the export script) under the location of this script. | |
# You can find them in the folder where Octopus Deploy is installed. | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$false,Position=1)] | |
[string]$importPath = ".\dump.raven", |