Created
November 30, 2016 11:12
-
-
Save abelevtsov/355e912afc15d74dbb3fa21489f2781d to your computer and use it in GitHub Desktop.
Revisions
-
abelevtsov created this gist
Nov 30, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ $environment = $OctopusParameters["Octopus.Environment.Name"] $buildPath = $OctopusParameters["BuildPath"] $apiuri = $OctopusParameters["PluginRegistrationServiceUrl"] Write-Output "Publish Plugins to $environment" $start_time = Get-Date $mergedPluginAssemblyPath = "$buildPath\Sk.Crm.Plugins.dll" $mergedPluginAssemblyPath = $mergedPluginAssemblyPath -replace "\\", "\\" $configPath = "$buildPath\RegisterFile.crmregister" $configPath = $configPath -replace "\\", "\\" $data = @" { "mergedPluginAssemblyPath": "$mergedPluginAssemblyPath", "configPath": "$configPath", "environment": "$environment" } "@ Write-Output $data Invoke-WebRequest -Uri $apiuri -Method POST -Body $data -ContentType "application/json" Write-Output "Plugins published successfully, time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"