Skip to content

Clu #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 15, 2015
Merged

Clu #245

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@
Dnx uses dynamic compilation, 'clean' is unnecessary -->
<Target
Name="Full"
DependsOnTargets="Build;Test" />
DependsOnTargets="Build;Test" >
<Exec Command="$(LibraryToolsFolder)\CLU\BuildAndInstallClu.bat"></Exec>
</Target>

<Target Name="BuildMsBuildTask" DependsOnTargets="RestoreNugetPackages">
<MSBuild Projects="$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks.csproj"
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Commands.Common.Storage/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"Microsoft.CLU": "1.0.0",
"Commands.Common": "",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
"Microsoft.Rest.ClientRuntime": "1.5.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Commands.Common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"System.Linq": "4.0.1-beta-23516",
"Microsoft.CLU": "1.0.0",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
"Microsoft.Rest.ClientRuntime": "1.5.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Commands.ResourceManager.Cmdlets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"Commands.Common.Authentication": "",
"Commands.Common": "",
"Commands.ResourceManager.Common": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
"Microsoft.Rest.ClientRuntime": "1.5.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Commands.ResourceManager.Common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"Microsoft.CLU": "1.0.0",
"Commands.Common": "",
"Commands.Common.Authentication": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
"Microsoft.Rest.ClientRuntime": "1.5.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"Commands.Common.Authentication": "",
"Commands.Common.Storage": "",
"Commands.ResourceManager.Common": "",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.210231457-alpha",
"Microsoft.Rest.ClientRuntime": "1.5.0",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "3.6.212041202-alpha",
"Microsoft.Rest.ClientRuntime": "1.8.0",
"Newtonsoft.Json": "7.0.1",
"System.Collections": "4.0.11-beta-23516",
"System.Collections.Concurrent": "4.0.11-beta-23516",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class NewAzureResourceGroupCommandTests : RMTestBase

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

private string storageAccountName = "myStorageAccount";
//private string storageAccountName = "myStorageAccount";

private Hashtable[] tags;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ public class NewAzureWebAppCommandTests

private Mock<ICommandRuntime> commandRuntimeMock;

// ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan
//ResourceGroupName, WebsiteName, SlotName, Location, WebHostingPlan

//private string resourceGroupName = "Default-Web-WestUS";

private string resourceGroupName = "Default-Web-WestUS";
//private string websiteName = "ngoliPSWebsite";

private string websiteName = "ngoliPSWebsite";

private string slotName = null;
//private string slotName = null;

private string webHostingPlan = "myWHP";
//private string webHostingPlan = "myWHP";

private string location = "West US";
//private string location = "West US";

private Dictionary<string, object> properties;
//private Dictionary<string, object> properties;

private Hashtable[] tags;
//private Hashtable[] tags;

public NewAzureWebAppCommandTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void CreateAccountResource(string accountName, string resourceGrou
{
string tenantUrlEnding = "batch-test.windows-int.net";
string endpoint = string.Format("{0}.{1}", accountName, tenantUrlEnding);
string subscription = "00000000-0000-0000-0000-000000000000";
//string subscription = "00000000-0000-0000-0000-000000000000";
string resourceGroup = resourceGroupName;
}
}
Expand Down
36 changes: 36 additions & 0 deletions tools/CLU/BuildAndInstallClu.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
echo off
setlocal
set root=%~dp0..\..
where dotnet.exe
if ERRORLEVEL 1 (
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
exit /B 1
)
@powershell -file %~dp0\BuildDrop.ps1

REM cook a msclu.cfg with a correct local repro path.
set mscluCfg=%root%\drop\clurun\win7-x64\msclu.cfg
if not exist %mscluCfg% (
copy /Y %root%\src\CLU\clurun\msclu.cfg %root%\drop\clurun\win7-x64
)
echo ^(Get-Content "%mscluCfg%"^) ^| ForEach-Object { $_ -replace "TOFILL", "%root%\drop\CommandRepo" } ^| Set-Content "%mscluCfg%"^ >"%temp%\Rep.ps1"
@powershell -file %temp%\Rep.ps1

%root%\drop\clurun\win7-x64\clurun.exe --install
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Profile
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources.Cmdlets
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Websites
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Management.Storage

REM setup osx and linux bits which can be xcopied and run.
REM note, for known nuget bugs, skip --install by copying over cmdlet packages.
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64
copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64

xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64
copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64
45 changes: 10 additions & 35 deletions tools/CLU/SetupEnv.bat
Original file line number Diff line number Diff line change
@@ -1,48 +1,23 @@
echo off

where dotnet.exe
if ERRORLEVEL 1 (
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
exit /B
)

setlocal
set root=%~dp0..\..
echo Build all clu source projects
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %root%\build.proj /t:build >NUL

if ERRORLEVEL 1 (
echo Build source project failed. To repro, run: msbuild build.proj /t:build
exit /B 1
)

REM build cmdlets packages
@powershell -file %~dp0\BuildDrop.ps1

REM cook a msclu.cfg with a correct local repro path.
set mscluCfg=%root%\drop\clurun\win7-x64\msclu.cfg
if not exist %mscluCfg% (
copy /Y %root%\src\CLU\clurun\msclu.cfg %root%\drop\clurun\win7-x64
)
echo ^(Get-Content "%mscluCfg%"^) ^| ForEach-Object { $_ -replace "TOFILL", "%root%\drop\CommandRepo" } ^| Set-Content "%mscluCfg%"^ >"%temp%\Rep.ps1"
@powershell -file %temp%\Rep.ps1

set DebugCLU=
%root%\drop\clurun\win7-x64\clurun.exe --install
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Profile
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Resources.Cmdlets
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Websites
%root%\drop\clurun\win7-x64\clurun.exe --install Microsoft.Azure.Commands.Management.Storage
set DebugCLU=1
call %~dp0\BuildAndInstallClu.bat
set Path=%Path%;%root%\drop\clurun\win7-x64
REM run 'azure help' to verify all are wired up
azure help
if ERRORLEVEL 1 (
echo Build and deploy clu package failed
exit /B 1
)
set DebugCLU=1

REM setup osx and linux bits which can be xcopied and run.
REM note, for known nuget bugs, skip --install by copying over cmdlet packages.
xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\osx.10.10-x64\pkgs /S /Q /I /Y
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\osx.10.10-x64
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\osx.10.10-x64
copy /Y %~dp0\azure.sh %root%\drop\clurun\osx.10.10-x64

xcopy %root%\drop\clurun\win7-x64\pkgs %root%\drop\clurun\ubuntu.14.04-x64\pkgs /S /Q /I /Y
copy /Y %root%\drop\clurun\win7-x64\azure.lx %root%\drop\clurun\ubuntu.14.04-x64
copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x64
copy /Y %~dp0\azure.sh %root%\drop\clurun\ubuntu.14.04-x64