Skip to content

Commit b0958e9

Browse files
Merge from experiments branch
2 parents a034a9b + 127395f commit b0958e9

25 files changed

+3947
-10
lines changed

build.proj

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
Condition=" '$(Scope)' == 'ServiceManagement'"/>
6262
<CmdletSolutionsToBuild Include=".\src\Storage\Storage.sln"
6363
Condition=" '$(Scope)' == 'AzureStorage' "/>
64+
<ExperimentalCmdletSolutionsToBuild Include=".\experiments\Websites.Experiments\Microsoft.Azure.Commands.Websites.Experiments.sln"/>
6465
<SetupSln Include=".\setup\azurepowershell.sln" />
6566
<StaticAnalysis Include=".\tools\StaticAnalysis\StaticAnalysis.sln" />
6667
<LocalBuildTasks Include="$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks.sln" />
@@ -140,8 +141,8 @@
140141
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
141142
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
142143
<NuGetRestorePackageSetting>-PackagesDirectory $(LibraryNugetPackageFolder)</NuGetRestorePackageSetting>
144+
<NuGetExperimentalCmdletPackages>-PackagesDirectory ".\experiments\Websites.Experiments\packages" </NuGetExperimentalCmdletPackages>
143145
<NuGetLocalBuildTaskPackages>-PackagesDirectory $(LibraryToolsFolder)\BuildPackagesTask\packages</NuGetLocalBuildTaskPackages>
144-
145146
<PowerShellCommand Condition=" '$(PowerShellCommand)' == '' ">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
146147
</PropertyGroup>
147148

@@ -171,6 +172,8 @@
171172
<!-- Restore packages for static analysis-->
172173
<Exec Command="$(NuGetCommand) restore %(StaticAnalysis.FullPath) $(NuGetRestoreConfigSwitch) $(NuGetRestorePackageSetting)"
173174
ContinueOnError="false" />
175+
<Exec Command="$(NuGetCommand) restore %(ExperimentalCmdletSolutionsToBuild.FullPath) $(NuGetRestoreConfigSwitch) $(NuGetExperimentalCmdletPackages)"
176+
ContinueOnError="false" />
174177
<!-- Restore packages for local build tasks-->
175178
<Exec Command="$(NuGetCommand) restore %(LocalBuildTasks.FullPath) $(NuGetRestoreConfigSwitch) $(NuGetLocalBuildTaskPackages)"
176179
ContinueOnError="false" />
@@ -196,7 +199,17 @@
196199
Targets="Build"
197200
Properties="Configuration=$(Configuration);Platform=Any CPU"
198201
BuildInParallel="$(BuildInParallel)"
199-
ContinueOnError="false" />
202+
ContinueOnError="false" />
203+
204+
<MSBuild
205+
Projects="@(ExperimentalCmdletSolutionsToBuild)"
206+
Targets="Build"
207+
Properties="Configuration=$(Configuration);Platform=Any CPU"
208+
BuildInParallel="$(BuildInParallel)"
209+
ContinueOnError="false" />
210+
211+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot; $(LibraryRoot)\experiments\Compute.Experiments\copy-dev.ps1 -Config $(Configuration) &quot;"
212+
ContinueOnError="ErrorAndContinue" />
200213

201214
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\GenerateHelp.ps1 -ValidateMarkdownHelp -GenerateMamlHelp -BuildConfig $(Configuration) &quot;"
202215
ContinueOnError="false"
@@ -322,7 +335,7 @@
322335
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\UpdateModules.ps1 $(Configuration) $(Scope) &quot;"/>
323336
<!-- Copying shortcut to be signed -->
324337
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
325-
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' "/>
338+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' "/>
326339
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
327340
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" Condition= " '$(NetCore)' == 'false' "/>
328341
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM.Netcore\AzureRM.Netcore.psd1"
@@ -397,6 +410,7 @@
397410
DestinationFolder="$(LibraryRoot)tools\AzureRM" Condition= " '$(NetCore)' == 'false' "/>
398411
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.Netcore.psd1"
399412
DestinationFolder="$(LibraryRoot)tools\AzureRM" Condition= " '$(NetCore)' == 'true' "/>
413+
400414
</Target>
401415

402416
<Target Name="CodeSignInstaller">
@@ -460,6 +474,9 @@
460474
<!-- Run checkin tests for each pull request -->
461475
<Target Name="Test" DependsOnTargets="BeforeRunTests">
462476
<Message Importance="high" Text="Running check in tests..." />
477+
<!-- Run unit tests for AppService experimental cmdlets -->
478+
<Exec Command="&quot;$(PowerShellCommand)&quot; -NonInteractive -NoLogo -NoProfile -Command &quot;Import-Module $(MSBuildProjectDirectory)\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1; Import-Module $(MSBuildProjectDirectory)\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Resources\AzureRM.Resources.psd1; Import-Module $(MSBuildProjectDirectory)\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Websites\AzureRM.Websites.psd1; Import-Module $(MSBuildProjectDirectory)\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Websites.Experiments\AzureRM.Websites.Experiments.psd1; $(MSBuildProjectDirectory)\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Websites.Experiments\Run-UnitTests.ps1&quot;"
479+
ContinueOnError="false"/>
463480
<CallTarget Targets="InvokeXUnit"/>
464481
</Target>
465482

experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ CompanyName = 'Microsoft'
3030
Copyright = 'Microsoft'
3131

3232
# Description of the functionality provided by this module
33-
Description = 'Azure Compute'
33+
Description = 'Azure Compute experiments for VM creation'
3434

3535
# Minimum version of the Windows PowerShell engine required by this module
3636
PowerShellVersion = '5.0'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
$clientSecret = ConvertTo-SecureString ([Guid]::NewGuid().ToString().Substring(1,10)) -AsPlainText -Force
3+
$pscredentials = New-Object System.Management.Automation.PSCredential("vmadmin", $clientSecret)
4+
New-AzVm -Name myVm1234 -Credential $pscredentials -WhatIf
5+
$vm = New-AzVm -Name myVm1234 -Credential $pscredentials
6+
$vm
7+
8+
#Cleanup
9+
Remove-AzureRmResourceGroup -ResourceId $vm.ResourceGroupId -Force
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
param([string] $Config="Release")
2+
3+
$outPath = Join-Path $PSScriptRoot -ChildPath "..\..\src\Package\$Config\ResourceManager\AzureResourceManager\AzureRM.Compute.Experiments\"
4+
Write-Host $outPath
5+
Copy-Item -Path $PSScriptRoot -Destination $outPath -Recurse -Exclude "AzureRM.Compute.Experiments.Tests.ps1", "publish-dev.ps1", "copy-dev.ps1" -Force
6+
7+

0 commit comments

Comments
 (0)