Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19108.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19112.3">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>044309163eadaad0068156f0327af458d562f171</Sha>
<Sha>9a5da1c8a3232c6304955c7a6ffe6109a1b13d9f</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
3 changes: 0 additions & 3 deletions eng/common/internal/Directory.Build.targets

This file was deleted.

4 changes: 4 additions & 0 deletions eng/common/internal/Tools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>
<ItemGroup>
<!-- Clear references, the SDK may add some depending on UsuingToolXxx settings, but we only want to restore the following -->
Expand All @@ -16,4 +17,7 @@
https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json;
</RestoreSources>
</PropertyGroup>

<!-- Repository extensibility point -->
<Import Project="$(RepositoryEngineeringDir)InternalTools.props" Condition="Exists('$(RepositoryEngineeringDir)InternalTools.props')" />
</Project>
42 changes: 15 additions & 27 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,11 @@ parameters:
enablePublishTestResults: false

# Optional: enable sending telemetry
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
# _HelixBuildConfig - differentiate between Debug, Release, other
# _HelixType - Example: build/product/
# _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
enableTelemetry: false

# Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
# Optional: define the helix repo for telemeetry (example: 'dotnet/arcade')
helixRepo: ''

# Optional: Define the type for helix telemetry (must end in '/')
helixType: build/product/

# Required: name of the job
name: ''

Expand Down Expand Up @@ -115,29 +108,20 @@ jobs:
- name: ${{ pair.key }}
value: ${{ pair.value }}

# Add additional variables
- ${{ if and(ne(parameters.helixRepo, ''), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- name: _HelixSource
value: official/${{ parameters.helixRepo }}/$(Build.SourceBranch)
- ${{ if and(ne(parameters.helixRepo, ''), or(ne(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest'))) }}:
- name: _HelixSource
value: pr/${{ parameters.helixRepo }}/$(Build.SourceBranch)
- name: _HelixType
value: ${{ parameters.helixType }}
- name: _HelixBuildConfig
value: $(_BuildConfig)

${{ if ne(parameters.workspace, '') }}:
workspace: ${{ parameters.workspace }}

steps:
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- template: /eng/common/templates/steps/telemetry-start.yml
parameters:
buildConfig: $(_HelixBuildConfig)
helixSource: $(_HelixSource)
helixType: $(_HelixType)
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
- task: sendStartTelemetry@0
displayName: 'Send Helix Start Telemetry'
inputs:
helixRepo: ${{ parameters.helixRepo }}
buildConfig: $(_BuildConfig)
runAsPublic: ${{ parameters.runAsPublic }}
continueOnError: ${{ parameters.continueOnError }}
condition: always()

- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -165,11 +149,15 @@ jobs:
TeamName: $(_TeamName)

- ${{ if eq(parameters.enableTelemetry, 'true') }}:
- template: /eng/common/templates/steps/telemetry-end.yml
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
- task: sendEndTelemetry@0
displayName: 'Send Helix End Telemetry'
continueOnError: ${{ parameters.continueOnError }}
condition: always()

- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
- task: PublishBuildArtifacts@1
displayName: Publish Logs to VSTS
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
Expand Down
10 changes: 2 additions & 8 deletions eng/common/templates/jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,15 @@ parameters:
enablePublishTestResults: false

# Optional: enable sending telemetry
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
# _HelixBuildConfig - differentiate between Debug, Release, other
# _HelixType - Example: build/product/
# _HelixSource - Example: official/dotnet/arcade/$(Build.SourceBranch)
# if enabled then the 'helixRepo' parameter should also be specified
enableTelemetry: false

# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []

# Optional: If specified, then automatically derive "_HelixSource" variable for telemetry
# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
helixRepo: ''

# Optional: Define the type for helix telemetry (must end in '/')
helixType: build/product/

# Optional: Override automatically derived dependsOn value for "publish build assets" job
publishBuildAssetsDependsOn: ''

Expand Down
19 changes: 14 additions & 5 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]

InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
} elseif ($install) {
} else {

if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
Expand All @@ -221,9 +221,10 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
}

$vsInstallDir = InstallXCopyMSBuild $xcopyMSBuildVersion
} else {
throw "Unable to find Visual Studio that has required version and components installed"
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
if ($vsInstallDir -eq $null) {
throw "Unable to find Visual Studio that has required version and components installed"
}
}

$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
Expand All @@ -241,12 +242,20 @@ function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [str
}
}

function InstallXCopyMSBuild([string] $packageVersion) {
function InstallXCopyMSBuild([string]$packageVersion) {
return InitializeXCopyMSBuild $packageVersion -install $true
}

function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
$packageName = "RoslynTools.MSBuild"
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"

if (!(Test-Path $packageDir)) {
if (!$install) {
return $null
}

Create-Directory $packageDir
Write-Host "Downloading $packageName $packageVersion"
Invoke-WebRequest "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/$packageName/$packageVersion/" -OutFile $packagePath
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"version": "3.0.100-preview-010024"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19108.1"
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19112.3"
}
}