Skip to content

Commit 0f3cb28

Browse files
dagoodtmat
andauthored
Enable source-build with Arcade SDK fixes (#692)
* Enable source build * Update dependencies from https://github.com/dotnet/arcade build 20210119.2 Co-authored-by: Tomáš Matoušek <[email protected]>
1 parent 650f955 commit 0f3cb28

File tree

8 files changed

+32
-22
lines changed

8 files changed

+32
-22
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ stages:
3737
enablePublishBuildAssets: true
3838
enablePublishUsingPipelines: $(_PublishUsingPipelines)
3939
enableTelemetry: true
40+
enableSourceBuild: true
4041
helixRepo: dotnet/symreader
4142
jobs:
4243
- job: Windows

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21062.10">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21069.2">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>ff8fec9066eca51a26abf723dd7d92e20926a90e</Sha>
8+
<Sha>ee0a6a7d9acc6f5886ae214b935f3e3d989235e4</Sha>
99
</Dependency>
1010
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="5.0.0-alpha.1.20473.1">
1111
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>

eng/common/post-build/publish-using-darc.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ param(
1616

1717
try {
1818
. $PSScriptRoot\post-build-utils.ps1
19-
# Hard coding darc version till the next arcade-services roll out, cos this version has required API changes for darc add-build-to-channel
20-
$darc = Get-Darc "1.1.0-beta.20418.1"
19+
20+
$darc = Get-Darc
2121

2222
$optionalParams = [System.Collections.ArrayList]::new()
2323

eng/common/templates/job/source-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ parameters:
2828
# container and pool.
2929
platform: {}
3030

31+
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
32+
# source-build builds run in Docker, including the default managed platform.
33+
defaultContainerHostPool:
34+
vmImage: ubuntu-20.04
35+
3136
jobs:
3237
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
3338
displayName: Source-Build (${{ parameters.platform.name }})
@@ -37,6 +42,9 @@ jobs:
3742

3843
${{ if ne(parameters.platform.container, '') }}:
3944
container: ${{ parameters.platform.container }}
45+
46+
${{ if eq(parameters.platform.pool, '') }}:
47+
pool: ${{ parameters.defaultContainerHostPool }}
4048
${{ if ne(parameters.platform.pool, '') }}:
4149
pool: ${{ parameters.platform.pool }}
4250

eng/common/templates/jobs/jobs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ parameters:
77

88
# Optional: Enable publishing using release pipelines
99
enablePublishUsingPipelines: false
10-
10+
11+
# Optional: Enable running the source-build jobs to build repo from source
12+
enableSourceBuild: false
13+
14+
# Optional: Parameters for source-build template.
15+
# See /eng/common/templates/jobs/source-build.yml for options
16+
sourceBuildParameters: []
17+
1118
graphFileGeneration:
1219
# Optional: Enable generating the graph files at the end of the build
1320
enabled: false
@@ -24,13 +31,6 @@ parameters:
2431
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
2532
runAsPublic: false
2633

27-
# Optional: Enable running the source-build jobs to build repo from source
28-
runSourceBuild: false
29-
30-
# Optional: Parameters for source-build template.
31-
# See /eng/common/templates/jobs/source-build.yml for options
32-
sourceBuildParameters: []
33-
3434
enableSourceIndex: false
3535
sourceIndexParams: {}
3636

@@ -53,7 +53,7 @@ jobs:
5353

5454
name: ${{ job.job }}
5555

56-
- ${{ if eq(parameters.runSourceBuild, true) }}:
56+
- ${{ if eq(parameters.enableSourceBuild, true) }}:
5757
- template: /eng/common/templates/jobs/source-build.yml
5858
parameters:
5959
allCompletedJobId: Source_Build_Complete
@@ -80,7 +80,7 @@ jobs:
8080
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
8181
- ${{ each job in parameters.jobs }}:
8282
- ${{ job.job }}
83-
- ${{ if eq(parameters.runSourceBuild, true) }}:
83+
- ${{ if eq(parameters.enableSourceBuild, true) }}:
8484
- Source_Build_Complete
8585
pool:
8686
vmImage: vs2017-win2016

eng/common/templates/jobs/source-build.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ parameters:
1111
# See /eng/common/templates/job/source-build.yml
1212
jobNamePrefix: 'Source_Build'
1313

14-
# If changed to true, causes this template to include the default platform for a managed-only
15-
# repo. The exact Docker image used for this build will be provided by Arcade. This has some risk,
16-
# but since the repo is supposed to be managed-only, the risk should be very low.
17-
includeDefaultManagedPlatform: false
14+
# This is the default platform provided by Arcade, intended for use by a managed-only repo.
1815
defaultManagedPlatform:
1916
name: 'Managed'
2017
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
2118

2219
# Defines the platforms on which to run build jobs. One job is created for each platform, and the
23-
# object in this array is sent to the job template as 'platform'.
20+
# object in this array is sent to the job template as 'platform'. If no platforms are specified,
21+
# one job runs on 'defaultManagedPlatform'.
2422
platforms: []
2523

2624
jobs:
@@ -32,7 +30,7 @@ jobs:
3230
dependsOn:
3331
- ${{ each platform in parameters.platforms }}:
3432
- ${{ parameters.jobNamePrefix }}_${{ platform.name }}
35-
- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}:
33+
- ${{ if eq(length(parameters.platforms), 0) }}:
3634
- ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }}
3735

3836
- ${{ each platform in parameters.platforms }}:
@@ -41,7 +39,7 @@ jobs:
4139
jobNamePrefix: ${{ parameters.jobNamePrefix }}
4240
platform: ${{ platform }}
4341

44-
- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}:
42+
- ${{ if eq(length(parameters.platforms), 0) }}:
4543
- template: /eng/common/templates/job/source-build.yml
4644
parameters:
4745
jobNamePrefix: ${{ parameters.jobNamePrefix }}

eng/common/templates/post-build/post-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ stages:
147147
pipeline: $(AzDOPipelineId)
148148
buildId: $(AzDOBuildId)
149149
artifactName: PackageArtifacts
150+
itemPattern: |
151+
**
152+
!**/Microsoft.SourceBuild.Intermediate.*.nupkg
150153
151154
# This is necessary whenever we want to publish/restore to an AzDO private feed
152155
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"dotnet": "5.0.100"
44
},
55
"msbuild-sdks": {
6-
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21062.10"
6+
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21069.2"
77
}
88
}

0 commit comments

Comments
 (0)