Skip to content

Commit 825ef65

Browse files
author
John Luo
authored
Merge branch 'master' into johluo/migrating-extensions
2 parents 7d1f5d8 + b3e2dac commit 825ef65

File tree

45 files changed

+351
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+351
-72
lines changed

.azure/pipelines/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ variables:
3838
value: ''
3939
- name: _SignType
4040
value: ''
41+
- name: _UseHelixOpenQueues
42+
value: 'true'
4143
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
44+
- group: DotNet-HelixApi-Access
45+
- name: _UseHelixOpenQueues
46+
value: 'false'
4247
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
4348
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
4449
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
@@ -582,6 +587,7 @@ stages:
582587
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
583588
displayName: Run build.cmd helix target
584589
env:
590+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
585591
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
586592
artifacts:
587593
- name: Helix_logs
@@ -591,6 +597,7 @@ stages:
591597

592598
- template: jobs/default-build.yml
593599
parameters:
600+
condition: ne(variables['Build.Reason'], 'PullRequest')
594601
jobName: Helix_x64_daily
595602
jobDisplayName: 'Tests: Helix x64 Daily'
596603
agentOs: Windows
@@ -601,6 +608,7 @@ stages:
601608
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
602609
displayName: Run build.cmd helix target
603610
env:
611+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
604612
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
605613
artifacts:
606614
- name: Helix_logs
@@ -622,6 +630,7 @@ stages:
622630
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
623631
displayName: Run build.sh helix arm64 target
624632
env:
633+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
625634
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
626635
installNodeJs: false
627636
artifacts:

.azure/pipelines/helix-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ pr:
1111
include:
1212
- '*'
1313

14+
variables:
15+
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
16+
- name: _UseHelixOpenQueues
17+
value: 'true'
18+
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
19+
- name: _UseHelixOpenQueues
20+
value: 'false'
21+
1422
jobs:
1523
- template: jobs/default-build.yml
1624
parameters:

.azure/pipelines/jobs/default-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ jobs:
233233
condition: always()
234234
inputs:
235235
testRunner: junit
236-
testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
236+
testResultsFiles: '**/TEST-junit-jupiter.xml'
237237
buildConfiguration: $(BuildConfiguration)
238238
buildPlatform: $(AgentOsName)
239239
mergeTestResults: true

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
###############################################################################
99
*.sh eol=lf
1010

11+
###############################################################################
12+
# Make gradlew always have LF as line endings
13+
###############################################################################
14+
gradlew eol=lf
15+
1116
###############################################################################
1217
# Set default behavior for command prompt diff.
1318
#

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,6 @@
187187
<Import Project="eng\targets\CSharp.Common.props" Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
188188
<Import Project="eng\targets\Wix.Common.props" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
189189
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
190+
<Import Project="eng\targets\Helix.props" Condition="'$(IsTestProject)' == 'true'" />
190191

191192
</Project>

Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,6 @@
163163
<Import Project="eng\targets\Wix.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
164164
<Import Project="eng\targets\Npm.Common.targets" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
165165
<Import Project="eng\targets\ReferenceAssembly.targets" Condition=" '$(HasReferenceAssembly)' == 'true' " />
166+
<Import Project="eng\targets\Helix.targets" Condition="'$(IsTestProject)' == 'true'" />
166167

167168
</Project>

eng/Version.Details.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@
221221
<Uri>https://github.com/dotnet/extensions</Uri>
222222
<Sha>396aff55e0b4628a7a44375e4b72e5d19a6e37ab</Sha>
223223
</Dependency>
224-
<Dependency Name="Microsoft.CSharp" Version="5.0.0-alpha.1.19563.6" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
225-
<Uri>https://github.com/dotnet/corefx</Uri>
226-
<Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
227-
</Dependency>
228224
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.1.20113.7" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
229225
<Uri>https://github.com/dotnet/runtime</Uri>
230226
<Sha>0f3f8e1930c28b67f29990126bc2e8527e959a2e</Sha>

eng/Versions.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,12 @@
6363
<MicrosoftDotNetGenAPIPackageVersion>5.0.0-beta.20113.3</MicrosoftDotNetGenAPIPackageVersion>
6464
<!-- Packages from dotnet/roslyn -->
6565
<MicrosoftNetCompilersToolsetPackageVersion>3.5.0-beta3-20114-02</MicrosoftNetCompilersToolsetPackageVersion>
66-
<!-- Packages from dotnet/core-setup -->
66+
<!-- Packages from dotnet/runtime -->
6767
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.1.20113.7</MicrosoftExtensionsDependencyModelPackageVersion>
6868
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.1.20113.7</MicrosoftNETCoreAppInternalPackageVersion>
6969
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.1.20113.7</MicrosoftNETCoreAppRefPackageVersion>
7070
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.1.20113.7</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
7171
<NETStandardLibraryRefPackageVersion>2.1.0-preview.1.20113.7</NETStandardLibraryRefPackageVersion>
72-
<!-- Packages from dotnet/corefx -->
73-
<MicrosoftCSharpPackageVersion>5.0.0-alpha.1.19563.6</MicrosoftCSharpPackageVersion>
7472
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.1.20113.7</MicrosoftWin32RegistryPackageVersion>
7573
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.1.20113.7</MicrosoftWin32SystemEventsPackageVersion>
7674
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.1.20113.7</SystemComponentModelAnnotationsPackageVersion>
@@ -174,6 +172,7 @@
174172
<MicrosoftSymbolUploaderBuildTaskPackageVersion>1.0.0-beta-64023-03</MicrosoftSymbolUploaderBuildTaskPackageVersion>
175173
<MicrosoftVSSDKBuildToolsVersion>15.9.3032</MicrosoftVSSDKBuildToolsVersion>
176174
<!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
175+
<MicrosoftCSharpPackageVersion>4.7.0</MicrosoftCSharpPackageVersion>
177176
<SystemBuffersPackageVersion>4.5.0</SystemBuffersPackageVersion>
178177
<SystemCodeDomPackageVersion>4.4.0</SystemCodeDomPackageVersion>
179178
<SystemCommandlineExperimentalPackageVersion>0.3.0-alpha.19317.1</SystemCommandlineExperimentalPackageVersion>

eng/helix/content/InstallJdk.ps1

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<#
2+
.SYNOPSIS
3+
Installs JDK into a folder in this repo.
4+
.DESCRIPTION
5+
This script downloads an extracts the JDK.
6+
.PARAMETER JdkVersion
7+
The version of the JDK to install. If not set, the default value is read from global.json
8+
.PARAMETER Force
9+
Overwrite the existing installation
10+
#>
11+
param(
12+
[string]$JdkVersion,
13+
[Parameter(Mandatory = $false)]
14+
$InstallDir
15+
)
16+
$ErrorActionPreference = 'Stop'
17+
$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
18+
19+
Set-StrictMode -Version 1
20+
21+
if ($InstallDir) {
22+
$installDir = $InstallDir;
23+
}
24+
else {
25+
$repoRoot = Resolve-Path "$PSScriptRoot\..\.."
26+
$installDir = "$repoRoot\.tools\jdk\win-x64\"
27+
}
28+
$tempDir = "$installDir\obj"
29+
if (-not $JdkVersion) {
30+
$globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
31+
$JdkVersion = $globalJson.tools.jdk
32+
}
33+
34+
if (Test-Path $installDir) {
35+
if ($Force) {
36+
Remove-Item -Force -Recurse $installDir
37+
}
38+
else {
39+
Write-Host "The JDK already installed to $installDir. Exiting without action. Call this script again with -Force to overwrite."
40+
exit 0
41+
}
42+
}
43+
44+
Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
45+
mkdir $tempDir -ea Ignore | out-null
46+
mkdir $installDir -ea Ignore | out-null
47+
Write-Host "Starting download of JDK ${JdkVersion}"
48+
Invoke-WebRequest -UseBasicParsing -Uri "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/jdk-${JdkVersion}_windows-x64_bin.zip" -OutFile "$tempDir/jdk.zip"
49+
Write-Host "Done downloading JDK ${JdkVersion}"
50+
51+
Add-Type -assembly "System.IO.Compression.FileSystem"
52+
[System.IO.Compression.ZipFile]::ExtractToDirectory("$tempDir/jdk.zip", "$tempDir/jdk/")
53+
54+
Write-Host "Expanded JDK to $tempDir"
55+
Write-Host "Installing JDK to $installDir"
56+
Move-Item "$tempDir/jdk/jdk-${JdkVersion}/*" $installDir
57+
Write-Host "Done installing JDK to $installDir"
58+
Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
59+
60+
if ($env:TF_BUILD) {
61+
Write-Host "##vso[task.prependpath]$installDir\bin"
62+
}

eng/helix/content/installjdk.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# Cause the script to fail if any subcommand fails
4+
set -e
5+
6+
pushd .
7+
8+
if [ "$JAVA_HOME" != "" ]; then
9+
echo "JAVA_HOME is set"
10+
exit
11+
fi
12+
13+
java_version=$1
14+
arch=$2
15+
osname=`uname -s`
16+
if [ "$osname" = "Darwin" ]; then
17+
echo "macOS not supported, relying on the machine providing java itself"
18+
exit 1
19+
else
20+
platformarch="linux-$arch"
21+
fi
22+
echo "PlatformArch: $platformarch"
23+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
24+
output_dir="$DIR/java"
25+
url="https://netcorenativeassets.blob.core.windows.net/resource-packages/external/linux/java/jdk-${java_version}_${platformarch}_bin.tar.gz"
26+
echo "Downloading from: $url"
27+
tmp="$(mktemp -d -t install-jdk.XXXXXX)"
28+
29+
cleanup() {
30+
exitcode=$?
31+
if [ $exitcode -ne 0 ]; then
32+
echo "Failed to install java with exit code: $exitcode"
33+
fi
34+
rm -rf "$tmp"
35+
exit $exitcode
36+
}
37+
38+
trap "cleanup" EXIT
39+
cd "$tmp"
40+
curl -Lsfo $(basename $url) "$url"
41+
echo "Installing java from $(basename $url) $url"
42+
mkdir $output_dir
43+
echo "Unpacking to $output_dir"
44+
tar --strip-components 1 -xzf "jdk-${java_version}_${platformarch}_bin.tar.gz" --no-same-owner --directory "$output_dir"
45+
46+
popd

0 commit comments

Comments
 (0)