Skip to content

Commit 2d066dc

Browse files
committed
Apply some fixes
1 parent 607a6b4 commit 2d066dc

File tree

92 files changed

+261
-2692
lines changed

Some content is hidden

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

92 files changed

+261
-2692
lines changed

.azure/pipelines/ci.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ variables:
3131
value: .NETCORE
3232
- name: _DotNetValidationArtifactsCategory
3333
value: .NETCORE
34+
- name: _UseHelixOpenQueues
35+
value: 'true'
3436
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
3537
- name: _BuildArgs
3638
value: ''
@@ -51,8 +53,6 @@ variables:
5153
# to have it in two different forms
5254
- name: _InternalRuntimeDownloadCodeSignArgs
5355
value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
54-
- name: _UseHelixOpenQueues
55-
value: 'true'
5656
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
5757
- group: DotNet-HelixApi-Access
5858
- name: _UseHelixOpenQueues
@@ -714,17 +714,6 @@ stages:
714714
chmod +x $HOME/bin/jq
715715
echo "##vso[task.prependpath]$HOME/bin"
716716
displayName: Install jq
717-
- task: UseDotNet@2
718-
displayName: 'Use .NET Core sdk'
719-
inputs:
720-
packageType: sdk
721-
# The SDK version selected here is intentionally supposed to use the latest release
722-
# For the purpose of building Linux distros, we can't depend on features of the SDK
723-
# which may not exist in pre-built versions of the SDK
724-
# Pinning to preview 8 since preview 9 has breaking changes
725-
version: 3.1.100
726-
installationPath: $(DotNetCoreSdkDir)
727-
includePreviewVersions: true
728717
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
729718
- task: Bash@3
730719
displayName: Setup Private Feeds Credentials

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
condition: always()
252252
inputs:
253253
testRunner: junit
254-
testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
254+
testResultsFiles: '**/TEST-junit-jupiter.xml'
255255
buildConfiguration: $(BuildConfiguration)
256256
buildPlatform: $(AgentOsName)
257257
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
@@ -189,5 +189,6 @@
189189
<Import Project="eng\targets\CSharp.Common.props" Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
190190
<Import Project="eng\targets\Wix.Common.props" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />
191191
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
192+
<Import Project="eng\targets\Helix.props" Condition="'$(IsTestProject)' == 'true'" />
192193

193194
</Project>

Directory.Build.targets

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

169170
</Project>

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

eng/helix/content/installnode.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ output_dir="$DIR/node"
2222
url="http://nodejs.org/dist/v$node_version/node-v$node_version-$platformarch.tar.gz"
2323
echo "Downloading from: $url"
2424
tmp="$(mktemp -d -t install-node.XXXXXX)"
25-
trap "rm -rf $tmp" EXIT
25+
26+
cleanup() {
27+
exitcode=$?
28+
if [ $exitcode -ne 0 ]; then
29+
echo "Failed to install node with exit code: $exitcode"
30+
fi
31+
rm -rf "$tmp"
32+
exit $exitcode
33+
}
34+
35+
trap "cleanup" EXIT
2636
cd "$tmp"
2737
curl -Lsfo $(basename $url) "$url"
2838
echo "Installing node from $(basename $url) $url"

eng/targets/CSharp.Common.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@
3535
</ItemDefinitionGroup>
3636

3737
<Import Project="CSharp.ReferenceAssembly.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
38-
<Import Project="Helix.props" Condition="'$(IsTestProject)' == 'true'" />
3938

4039
</Project>

eng/targets/CSharp.Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030

3131
<Import Project="Packaging.targets" />
3232
<Import Project="ResolveReferences.targets" />
33-
<Import Project="Helix.targets" Condition="'$(IsTestProject)' == 'true'" />
33+
3434
</Project>

0 commit comments

Comments
 (0)