diff --git a/.vsts/builds/fast-pr-validation.yml b/.vsts/builds/fast-pr-validation.yml new file mode 100644 index 0000000000000000000000000000000000000000..426b7a79a83a888a8191d8690f6b695171e440c9 --- /dev/null +++ b/.vsts/builds/fast-pr-validation.yml @@ -0,0 +1,17 @@ +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.1 + +phases: +- template: .vsts-pipelines/templates/project-ci.yml@buildtools + parameters: + buildArgs: "/t:CheckUniverse" diff --git a/run.ps1 b/run.ps1 index 29f826e9aa8fcf825543d991e5a5942e24787a40..95f7f2246ffb24adab4a3bf94f92da426381bd2c 100644 --- a/run.ps1 +++ b/run.ps1 @@ -32,6 +32,9 @@ Re-installs KoreBuild .PARAMETER ConfigFile The path to the configuration file that stores values. Defaults to korebuild.json. +.PARAMETER CI +Sets up CI specific settings and variables. + .PARAMETER PackageVersionPropsUrl (optional) the url of the package versions props path containing dependency versions. @@ -61,8 +64,8 @@ in the file are overridden by command line parameters. Example config file: ```json { - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", - "channel": "dev", + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", + "channel": "master", "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" } ``` @@ -81,7 +84,8 @@ param( [Alias('u')] [switch]$Update, [switch]$Reinstall, - [string]$ConfigFile, + [string]$ConfigFile = $null, + [switch]$CI, [string]$PackageVersionPropsUrl = $null, [string]$AccessTokenSuffix = $null, [string]$RestoreSources = $null, @@ -202,7 +206,7 @@ if (!$DotNetHome) { else { Join-Path $PSScriptRoot '.dotnet'} } -if (!$Channel) { $Channel = 'dev' } +if (!$Channel) { $Channel = 'master' } if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } if ($PackageVersionPropsUrl) { @@ -235,7 +239,7 @@ $korebuildPath = Get-KoreBuild Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI Invoke-KoreBuildCommand $Command @MSBuildArguments } finally { diff --git a/run.sh b/run.sh index 2be18220d0f7d1dc2747e9bca35e8d4b421aab7b..1eef4d8194b939ff5f147e63cda980fa26231f54 100755 --- a/run.sh +++ b/run.sh @@ -18,6 +18,7 @@ reinstall=false repo_path="$DIR" channel='' tools_source='' +ci=false package_version_props_url='' asset_root_url='' access_token_suffix='' @@ -48,6 +49,7 @@ __usage() { echo " --product-build-id <ID> The product build ID for correlation with orchestrated builds." echo " -u|--update Update to the latest KoreBuild even if the lock file is present." echo " --reinstall Reinstall KoreBuild." + echo " --ci Apply CI specific settings and environment variables." echo "" echo "Description:" echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." @@ -216,6 +218,9 @@ while [[ $# -gt 0 ]]; do --reinstall|-Reinstall) reinstall=true ;; + --ci|-[Cc][Ii]) + ci=true + ;; --verbose|-Verbose) verbose=true ;; @@ -284,11 +289,11 @@ if [ ! -z "$product_build_id" ]; then msbuild_args[${#msbuild_args[*]}]="-p:DotNetProductBuildId=$product_build_id" fi -[ -z "$channel" ] && channel='dev' +[ -z "$channel" ] && channel='master' [ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' get_korebuild -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" # This incantation avoids unbound variable issues if msbuild_args is empty # https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u