Skip to content

Commit

Permalink
Add Deploy-StaticContent.ps1 (NuGet#3529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Bommarito authored Feb 11, 2017
1 parent 4b99fbf commit 2ed3fee
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Deploy-StaticContent.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[CmdletBinding(DefaultParameterSetName='RegularBuild')]
param (
[string]$StorageAccountName,
[string]$StorageAccountKey,
[string]$Environment
)

Write-Host "Uploading static $Environment gallery content to $StorageAccountName."

[System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\Microsoft.WindowsAzure.StorageClient.dll")

$account = [Microsoft.WindowsAzure.CloudStorageAccount]::Parse("DefaultEndpointsProtocol=https;AccountName=$StorageAccountName;AccountKey=$StorageAccountKey")
$client = [Microsoft.WindowsAzure.StorageClient.CloudStorageAccountStorageClientExtensions]::CreateCloudBlobClient($account)

$files = Get-ChildItem ".\content\$Environment"
foreach ($file in $files) {
$blob = $client.GetBlockBlob("content/$file")
try {
$snappy = $blob.CreateSnapshot()
Write-Host "Created snapshot of existing 'content/$file'."
} catch {}
$blob.UploadFile($file.FullName)
Write-Host "Uploaded 'content/$file'."
}
25 changes: 24 additions & 1 deletion content/PROD/Team.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,28 @@
"sblom",
"zhili1208",
"xavierdecoster",
"maartenba"
"maartenba",
"scottbommarito",
"joelverhagen",
"shishirx34",
"ryuyu",
"skofman1",
"chenriksson",
"cristinamanum",
"alpaix",
"anangaur",
"diverdan92",
"DoRonMotter",
"drewgillies",
"dtivel",
"ericstj",
"jainaashish",
"jasonmalinowski",
"jonwchu",
"karann-msft",
"mishra14",
"nkolev92",
"rohit21agrawal",
"rrelyea",
"yishaigalatzer"
]

0 comments on commit 2ed3fee

Please sign in to comment.