37 строки
1.8 KiB
YAML
37 строки
1.8 KiB
YAML
version: 1.0.{build}
|
|
clone_folder: '%iis_admin_solution_dir%'
|
|
init:
|
|
- cmd: >
|
|
npm install -g bower
|
|
- ps: >
|
|
git config --global core.autocrlf true;
|
|
setx iis_admin_solution_dir $env:iis_admin_solution_dir /m;
|
|
setx iis_admin_test_dir $env:iis_admin_test_dir /m;
|
|
environment:
|
|
iis_admin_solution_dir: c:\src\repos\IIS.Administration
|
|
iis_admin_test_dir: c:\tests\iisadmin
|
|
publish_out_dir: '%iis_admin_solution_dir%\bin\publish_out'
|
|
services: iis
|
|
before_build:
|
|
- ps: dotnet restore
|
|
build:
|
|
verbosity: minimal
|
|
after_build:
|
|
- ps: >
|
|
& "$env:iis_admin_solution_dir\scripts\Configure-DevEnvironment.ps1" -ConfigureTestEnvironment;
|
|
& "$env:iis_admin_solution_dir\scripts\publish\publish.ps1" -OutputPath $env:publish_out_dir -SkipPrompt;
|
|
Get-WindowsOptionalFeature -Online | where {$_.FeatureName -match "IIS-" -and $_.State -eq [Microsoft.Dism.Commands.FeatureState]::Disabled} | % {Enable-WindowsOptionalFeature -Online -FeatureName $_.FeatureName};
|
|
& "$env:publish_out_dir\setup\setup.ps1" Install -Verbose -Port 44326;
|
|
$appsettings = Get-ChildItem -Recurse 'C:\Program Files\IIS Administration\' appsettings.json;
|
|
$securityScript = Get-ChildItem -Recurse 'C:\Program Files\IIS Administration\' security.ps1;
|
|
Push-Location $securityScript.Directory;
|
|
.\security.ps1 Add-SelfRights -Path $appsettings.FullName;
|
|
Pop-Location;
|
|
[System.IO.File]::ReadAllText("$env:iis_admin_solution_dir\test\appsettings.test.json").replace("IIS Administrators", [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.Replace('\', '\\')) | Out-File $appsettings.FullName;
|
|
Restart-Service "Microsoft IIS Administration";
|
|
test_script:
|
|
- ps: dotnet test "$env:iis_admin_solution_dir\test\Microsoft.IIS.Administration.Tests\Microsoft.IIS.Administration.Tests.csproj"
|
|
artifacts:
|
|
- path: bin\publish_out
|
|
name: IIS Administration
|
|
type: zip |