Skip to content

Commit abd104b

Browse files
committed
Merge pull request #245 from Azure/clu
Clu
2 parents 8ebd9b5 + e83ad22 commit abd104b

File tree

11 files changed

+69
-57
lines changed

11 files changed

+69
-57
lines changed

build.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@
182182
Dnx uses dynamic compilation, 'clean' is unnecessary -->
183183
<Target
184184
Name="Full"
185-
DependsOnTargets="Build;Test" />
185+
DependsOnTargets="Build;Test" >
186+
<Exec Command="$(LibraryToolsFolder)\CLU\BuildAndInstallClu.bat"></Exec>
187+
</Target>
186188

187189
<Target Name="BuildMsBuildTask" DependsOnTargets="RestoreNugetPackages">
188190
<MSBuild Projects="$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks.csproj"

src/CLU/Commands.Common.Storage/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"Microsoft.CLU": "1.0.0",
2020
"Commands.Common": "",
2121
"Commands.Common.Authentication": "",
22-
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
23-
"Microsoft.Rest.ClientRuntime": "1.5.0",
22+
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
23+
"Microsoft.Rest.ClientRuntime": "1.8.0",
2424
"Newtonsoft.Json": "7.0.1",
2525
"System.Collections": "4.0.11-beta-23516",
2626
"System.Collections.Concurrent": "4.0.11-beta-23516",

src/CLU/Commands.Common/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"System.Linq": "4.0.1-beta-23516",
1919
"Microsoft.CLU": "1.0.0",
2020
"Commands.Common.Authentication": "",
21-
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
22-
"Microsoft.Rest.ClientRuntime": "1.5.0",
21+
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
22+
"Microsoft.Rest.ClientRuntime": "1.8.0",
2323
"Newtonsoft.Json": "7.0.1",
2424
"System.Collections": "4.0.11-beta-23516",
2525
"System.Collections.Concurrent": "4.0.11-beta-23516",

src/CLU/Commands.ResourceManager.Cmdlets/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"Commands.Common.Authentication": "",
2121
"Commands.Common": "",
2222
"Commands.ResourceManager.Common": "",
23-
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
24-
"Microsoft.Rest.ClientRuntime": "1.5.0",
23+
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
24+
"Microsoft.Rest.ClientRuntime": "1.8.0",
2525
"Newtonsoft.Json": "7.0.1",
2626
"System.Collections": "4.0.11-beta-23516",
2727
"System.Collections.Concurrent": "4.0.11-beta-23516",

src/CLU/Commands.ResourceManager.Common/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"Microsoft.CLU": "1.0.0",
2020
"Commands.Common": "",
2121
"Commands.Common.Authentication": "",
22-
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
23-
"Microsoft.Rest.ClientRuntime": "1.5.0",
22+
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
23+
"Microsoft.Rest.ClientRuntime": "1.8.0",
2424
"Newtonsoft.Json": "7.0.1",
2525
"System.Collections": "4.0.11-beta-23516",
2626
"System.Collections.Concurrent": "4.0.11-beta-23516",

src/CLU/Microsoft.Azure.Commands.Management.Storage/project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"Commands.Common.Authentication": "",
2222
"Commands.Common.Storage": "",
2323
"Commands.ResourceManager.Common": "",
24-
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
25-
"Microsoft.Rest.ClientRuntime": "1.5.0",
24+
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
25+
"Microsoft.Rest.ClientRuntime": "1.8.0",
2626
"Newtonsoft.Json": "7.0.1",
2727
"System.Collections": "4.0.11-beta-23516",
2828
"System.Collections.Concurrent": "4.0.11-beta-23516",

src/CLU/Microsoft.Azure.Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class NewAzureResourceGroupCommandTests : RMTestBase
4141

4242
private string templateFile = @"Resources\sampleTemplateFile.json";
4343

44-
private string storageAccountName = "myStorageAccount";
44+
//private string storageAccountName = "myStorageAccount";
4545

4646
private Hashtable[] tags;
4747

src/CLU/Microsoft.Azure.Commands.Websites.Test/NewAzureWebsitesCommandTests.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,21 @@ public class NewAzureWebAppCommandTests
3030

3131
private Mock<ICommandRuntime> commandRuntimeMock;
3232

33-
// ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan
33+
//ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan
3434

35+
//private string resourceGroupName = "Default-Web-WestUS";
3536

36-
private string resourceGroupName = "Default-Web-WestUS";
37+
//private string websiteName = "ngoliPSWebsite";
3738

38-
private string websiteName = "ngoliPSWebsite";
39-
40-
private string slotName = null;
39+
//private string slotName = null;
4140

42-
private string webHostingPlan = "myWHP";
41+
//private string webHostingPlan = "myWHP";
4342

44-
private string location = "West US";
43+
//private string location = "West US";
4544

46-
private Dictionary<string, object> properties;
45+
//private Dictionary<string, object> properties;
4746

48-
private Hashtable[] tags;
47+
//private Hashtable[] tags;
4948

5049
public NewAzureWebAppCommandTests()
5150
{

src/CLU/Microsoft.Azure.Commands.Websites.Test/WebsitesTestHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void CreateAccountResource(string accountName, string resourceGrou
2424
{
2525
string tenantUrlEnding = "batch-test.windows-int.net";
2626
string endpoint = string.Format("{0}.{1}", accountName, tenantUrlEnding);
27-
string subscription = "00000000-0000-0000-0000-000000000000";
27+
//string subscription = "00000000-0000-0000-0000-000000000000";
2828
string resourceGroup = resourceGroupName;
2929
}
3030
}

tools/CLU/BuildAndInstallClu.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
echo off
2+
setlocal
3+
set root=%~dp0..\..
4+
where dotnet.exe
5+
if ERRORLEVEL 1 (
6+
echo Please install 'dotnet', say from 'https://azureclu.blob.core.windows.net/tools/dotnet-win-x64.latest.zip', unzip, then add its bin folder to the PATH
7+
exit /B 1
8+
)
9+
@powershell -file %~dp0\BuildDrop.ps1
10+
11+
REM cook a msclu.cfg with a correct local repro path.
12+
set mscluCfg=%root%\drop\clurun\win7-x64\msclu.cfg
13+
if not exist %mscluCfg% (
14+
copy /Y %root%\src\CLU\clurun\msclu.cfg %root%\drop\clurun\win7-x64
15+
)
16+
echo ^(Get-Content "%mscluCfg%"^) ^| ForEach-Object { $_ -replace "TOFILL", "%root%\drop\CommandRepo" } ^| Set-Content "%mscluCfg%"^ >"%temp%\Rep.ps1"
17+
@powershell -file %temp%\Rep.ps1
18+
19+
%root%\drop\clurun\win7-x64\clurun.exe --install
20+
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Profile
21+
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources
22+
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources.Cmdlets
23+
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Websites
24+
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Management.Storage
25+
26+
REM setup osx and linux bits which can be xcopied and run.
27+
REM note, for known nuget bugs, skip --install by copying over cmdlet packages.
28+
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y
29+
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64
30+
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64
31+
copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64
32+
33+
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y
34+
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64
35+
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64
36+
copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64

tools/CLU/SetupEnv.bat

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
11
echo off
2-
3-
where dotnet.exe
4-
if ERRORLEVEL 1 (
5-
echo Please install 'dotnet', say from 'https://azureclu.blob.core.windows.net/tools/dotnet-win-x64.latest.zip', unzip, then add its bin folder to the PATH
6-
exit /B
7-
)
8-
2+
setlocal
93
set root=%~dp0..\..
104
echo Build all clu source projects
115
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %root%\build.proj /t:build >NUL
126

137
if ERRORLEVEL 1 (
148
echo Build source project failed. To repro, run: msbuild build.proj /t:build
9+
exit /B 1
1510
)
1611

1712
REM build cmdlets packages
18-
@powershell -file %~dp0\BuildDrop.ps1
19-
20-
REM cook a msclu.cfg with a correct local repro path.
21-
set mscluCfg=%root%\drop\clurun\win7-x64\msclu.cfg
22-
if not exist %mscluCfg% (
23-
copy /Y %root%\src\CLU\clurun\msclu.cfg %root%\drop\clurun\win7-x64
24-
)
25-
echo ^(Get-Content "%mscluCfg%"^) ^| ForEach-Object { $_ -replace "TOFILL", "%root%\drop\CommandRepo" } ^| Set-Content "%mscluCfg%"^ >"%temp%\Rep.ps1"
26-
@powershell -file %temp%\Rep.ps1
27-
2813
set DebugCLU=
29-
%root%\drop\clurun\win7-x64\clurun.exe --install
30-
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Profile
31-
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources
32-
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources.Cmdlets
33-
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Websites
34-
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Management.Storage
35-
set DebugCLU=1
14+
call %~dp0\BuildAndInstallClu.bat
3615
set Path=%Path%;%root%\drop\clurun\win7-x64
16+
REM run 'azure help' to verify all are wired up
17+
azure help
18+
if ERRORLEVEL 1 (
19+
echo Build and deploy clu package failed
20+
exit /B 1
21+
)
22+
set DebugCLU=1
3723

38-
REM setup osx and linux bits which can be xcopied and run.
39-
REM note, for known nuget bugs, skip --install by copying over cmdlet packages.
40-
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y
41-
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64
42-
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64
43-
copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64
44-
45-
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y
46-
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64
47-
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64
48-
copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64

0 commit comments

Comments
 (0)