Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate McMaster <nate.mcmaster@microsoft.com>2018-08-10 19:10:09 +0300
committerNate McMaster <nate.mcmaster@microsoft.com>2018-08-10 19:19:06 +0300
commita7a95c6da1b043e109524e2e327b785fe52f7852 (patch)
treeb3cd55505333127372f57655393588284ba64d63
parenta85d99ab8ea4a123568556dc70b6b3a2f65129bc (diff)
Add PR validation on VSTS
-rw-r--r--.vsts/builds/fast-pr-validation.yml17
-rw-r--r--run.ps114
-rwxr-xr-xrun.sh9
3 files changed, 33 insertions, 7 deletions
diff --git a/.vsts/builds/fast-pr-validation.yml b/.vsts/builds/fast-pr-validation.yml
new file mode 100644
index 0000000000..426b7a79a8
--- /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 29f826e9aa..95f7f2246f 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 2be18220d0..1eef4d8194 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