Adding VSTS configuration (#126)

This commit is contained in:
Ryan Brandenburg 2018-07-27 10:13:38 -07:00 committed by Nate McMaster
parent edce1234ee
commit 0f75a7df94
10 changed files with 227 additions and 24 deletions

View File

@ -9,6 +9,9 @@ environment:
global:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
install:
- ps: .\test\update_schema.ps1
- net start w3svc
build_script:
- ps: .\run.ps1 default-build
clone_depth: 1

View File

@ -22,7 +22,7 @@ branches:
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl nginx;
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
/usr/local/lib/; else ./install-nginx.sh; fi
/usr/local/lib/; else apt-get install nginx; fi
install:
- export PATH="$PATH:$HOME/nginxinstall/sbin/"
script:

View File

@ -0,0 +1,13 @@
trigger:
- master
- release/*
resources:
repositories:
- repository: buildtools
type: git
name: aspnet-BuildTools
ref: refs/heads/release/2.2
phases:
- template: ../templates/server-tests-steps.yml

View File

@ -0,0 +1,15 @@
trigger:
- master
- release/*
# See https://github.com/aspnet/BuildTools
resources:
repositories:
- repository: buildtools
type: github
endpoint: DotNet-Bot GitHub Connection
name: aspnet/BuildTools
ref: refs/heads/release/2.2
phases:
- template: ../templates/server-tests-steps.yml

View File

@ -0,0 +1,20 @@
phases:
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: Windows
beforeBuild:
- powershell: "& ./test/update_schema.ps1"
- powershell: Restart-Service w3svc
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: macOS
beforeBuild:
- script: brew install nginx
- template: .vsts-pipelines/templates/phases/default-build.yml@buildtools
parameters:
agentOs: Linux
beforeBuild:
- script: apt-get update
- script: apt-get install libpcre3 libpcre3-dev nginx

View File

@ -1,33 +1,33 @@
<Project>
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-17099</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
<MicrosoftAspNetCoreResponseCompressionPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreResponseCompressionPackageVersion>
<MicrosoftAspNetCoreServerHttpSysPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreServerHttpSysPackageVersion>
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
<MicrosoftAspNetCoreServerIISPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreServerIISPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreServerKestrelPackageVersion>
<MicrosoftAspNetCoreWebUtilitiesPackageVersion>2.2.0-preview1-34755</MicrosoftAspNetCoreWebUtilitiesPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.2.0-preview1-34755</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.2.0-preview1-34755</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>2.2.0-preview1-34755</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>2.2.0-preview1-34755</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>2.2.0-preview1-34755</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
<MicrosoftAspNetCoreResponseCompressionPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreResponseCompressionPackageVersion>
<MicrosoftAspNetCoreServerHttpSysPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreServerHttpSysPackageVersion>
<MicrosoftAspNetCoreServerIISIntegrationPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreServerIISIntegrationPackageVersion>
<MicrosoftAspNetCoreServerIISPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreServerIISPackageVersion>
<MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreServerIntegrationTestingIISPackageVersion>
<MicrosoftAspNetCoreServerKestrelPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreServerKestrelPackageVersion>
<MicrosoftAspNetCoreWebUtilitiesPackageVersion>2.2.0-preview1-34806</MicrosoftAspNetCoreWebUtilitiesPackageVersion>
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>2.2.0-preview1-34806</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
<MicrosoftExtensionsConfigurationJsonPackageVersion>2.2.0-preview1-34806</MicrosoftExtensionsConfigurationJsonPackageVersion>
<MicrosoftExtensionsLoggingConsolePackageVersion>2.2.0-preview1-34806</MicrosoftExtensionsLoggingConsolePackageVersion>
<MicrosoftExtensionsLoggingPackageVersion>2.2.0-preview1-34806</MicrosoftExtensionsLoggingPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>2.2.0-preview1-34806</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
<MicrosoftNETCoreApp21PackageVersion>2.1.2</MicrosoftNETCoreApp21PackageVersion>
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview1-26618-02</MicrosoftNETCoreApp22PackageVersion>
<MicrosoftNetHttpHeadersPackageVersion>2.2.0-preview1-34755</MicrosoftNetHttpHeadersPackageVersion>
<MicrosoftNetHttpHeadersPackageVersion>2.2.0-preview1-34806</MicrosoftNetHttpHeadersPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
<SerilogExtensionsLoggingPackageVersion>1.4.0</SerilogExtensionsLoggingPackageVersion>
<SerilogSinksFilePackageVersion>3.2.0</SerilogSinksFilePackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.0-rc.1.build4038</XunitRunnerVisualStudioPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup>
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
</Project>

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
curl -sSL http://nginx.org/download/nginx-1.8.0.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.8.0/
./configure --prefix=$HOME/nginxinstall --with-http_ssl_module
make
make install

View File

@ -0,0 +1,39 @@
<!--
IIS Asp.Net Core Extension Schema
** Please DO NOT edit this file yourself. **
If you want to add configuration sections to the schema, you may place
them in .xml files similar to this one, in this directory. They will be
picked up automatically on startup.
-->
<configSchema>
<sectionSchema name="system.webServer/aspNetCore">
<attribute name="processPath" type="string" expanded="true"/>
<attribute name="arguments" type="string" expanded="true" defaultValue=""/>
<attribute name="startupTimeLimit" type="uint" defaultValue="120" validationType="integerRange" validationParameter="0,3600"/> <!-- in seconds -->
<attribute name="shutdownTimeLimit" type="uint" defaultValue="10" validationType="integerRange" validationParameter="0,600"/> <!-- in seconds -->
<attribute name="rapidFailsPerMinute" type="uint" defaultValue="10" validationType="integerRange" validationParameter="0,100"/>
<attribute name="requestTimeout" type="timeSpan" defaultValue="00:02:00" validationType="timeSpanRange" validationParameter="0,1296000,60"/>
<attribute name="stdoutLogEnabled" type="bool" defaultValue="false" />
<attribute name="stdoutLogFile" type="string" defaultValue=".\aspnetcore-stdout" expanded="true"/>
<attribute name="processesPerApplication" type="uint" defaultValue="1" validationType="integerRange" validationParameter="1,100"/>
<attribute name="forwardWindowsAuthToken" type="bool" defaultValue="true" />
<attribute name="disableStartUpErrorPage" type="bool" defaultValue="false" />
<attribute name="hostingModel" type="string" />
<element name="recycleOnFileChange">
<collection addElement="file" clearElement="clear">
<attribute name="path" type="string" required="true" validationType="nonEmptyString" expanded="true"/>
</collection>
</element>
<element name="environmentVariables">
<collection addElement="environmentVariable" clearElement="clear" >
<attribute name="name" type="string" required="true" validationType="nonEmptyString"/>
<attribute name="value" type="string" required="true"/>
</collection>
</element>
</sectionSchema>
</configSchema>

View File

@ -0,0 +1,47 @@
<!--
IIS Asp.Net Core Extension Schema
** Please DO NOT edit this file yourself. **
If you want to add configuration sections to the schema, you may place
them in .xml files similar to this one, in this directory. They will be
picked up automatically on startup.
-->
<configSchema>
<sectionSchema name="system.webServer/aspNetCore">
<attribute name="processPath" type="string" expanded="true"/>
<attribute name="arguments" type="string" expanded="true" defaultValue=""/>
<attribute name="startupTimeLimit" type="uint" defaultValue="120" validationType="integerRange" validationParameter="0,3600"/>
<!-- in seconds -->
<attribute name="shutdownTimeLimit" type="uint" defaultValue="10" validationType="integerRange" validationParameter="0,600"/>
<!-- in seconds -->
<attribute name="rapidFailsPerMinute" type="uint" defaultValue="10" validationType="integerRange" validationParameter="0,100"/>
<attribute name="requestTimeout" type="timeSpan" defaultValue="00:02:00" validationType="timeSpanRange" validationParameter="0,1296000,1"/>
<attribute name="stdoutLogEnabled" type="bool" defaultValue="false" />
<attribute name="stdoutLogFile" type="string" defaultValue=".\aspnetcore-stdout" expanded="true"/>
<attribute name="processesPerApplication" type="uint" defaultValue="1" validationType="integerRange" validationParameter="1,100"/>
<attribute name="forwardWindowsAuthToken" type="bool" defaultValue="true" />
<attribute name="disableStartUpErrorPage" type="bool" defaultValue="false" />
<attribute name="hostingModel" type="string" />
<element name="recycleOnFileChange">
<collection addElement="file" clearElement="clear">
<attribute name="path" type="string" required="true" validationType="nonEmptyString" expanded="true"/>
</collection>
</element>
<element name="environmentVariables">
<collection addElement="environmentVariable" clearElement="clear" >
<attribute name="name" type="string" required="true" validationType="nonEmptyString"/>
<attribute name="value" type="string" required="true"/>
</collection>
</element>
<element name="handlerSettings">
<collection addElement="handlerSetting" clearElement="clear" >
<attribute name="name" type="string" required="true" validationType="nonEmptyString"/>
<attribute name="value" type="string" required="true"/>
</collection>
</element>
</sectionSchema>
</configSchema>

72
test/update_schema.ps1 Normal file
View File

@ -0,0 +1,72 @@
<#
.DESCRIPTION
Updates aspnetcore_schema.xml to the latest version.
Updates aspnetcore_schema_v2.xml to the latest version.
Requires admin privileges.
#>
[cmdletbinding(SupportsShouldProcess = $true)]
param()
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 1
$ancmSchemaFiles = @(
"aspnetcore_schema.xml",
"aspnetcore_schema_v2.xml"
)
$ancmSchemaFileLocations = @(
@(Resolve-Path "$PSScriptRoot\aspnetcore_schema.xml"),
@(Resolve-Path "$PSScriptRoot\aspnetcore_schema_v2.xml")
)
[bool]$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $isAdmin -and -not $WhatIfPreference) {
if ($PSCmdlet.ShouldContinue("Continue as an admin?", "This script needs admin privileges to update IIS Express and IIS.")) {
$thisFile = Join-Path $PSScriptRoot $MyInvocation.MyCommand.Name
Start-Process `
-Verb runas `
-FilePath "powershell.exe" `
-ArgumentList $thisFile `
-Wait `
| Out-Null
if (-not $?) {
throw 'Update failed'
}
exit
}
else {
throw 'Requires admin privileges'
}
}
for ($i=0; $i -lt $ancmSchemaFiles.Length; $i++)
{
$schemaFile = $ancmSchemaFiles[$i]
$schemaSource = $ancmSchemaFileLocations[$i]
$destinations = @(
"${env:ProgramFiles(x86)}\IIS Express\config\schema\",
"${env:ProgramFiles}\IIS Express\config\schema\",
"${env:windir}\system32\inetsrv\config\schema\"
)
foreach ($destPath in $destinations) {
$dest = "$destPath\${schemaFile}";
if (!(Test-Path $destPath))
{
Write-Host "$destPath doesn't exist"
continue;
}
if ($PSCmdlet.ShouldProcess($dest, "Replace file")) {
Write-Host "Updated $dest"
Move-Item $dest "${dest}.bak" -ErrorAction Ignore
Copy-Item $schemaSource $dest
}
}
}