-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add official build support to standalone templates #261
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<PublishingVersion>3</PublishingVersion> | ||
</PropertyGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,50 +4,74 @@ parameters: | |
archType: '' | ||
container: '' | ||
pool: {} | ||
isOfficialBuild: '' | ||
isOfficialBuild: false | ||
runTests: true | ||
|
||
jobs: | ||
|
||
- template: /eng/common/templates/job/job.yml | ||
- template: /eng/common/templates/jobs/jobs.yml | ||
parameters: | ||
displayName: ${{ format('{0} {1}', parameters.osGroup, parameters.archType) }} | ||
name: ${{ format('{0}_{1}', parameters.osGroup, parameters.archType) }} | ||
enableTelemetry: ${{ parameters.isOfficialBuild }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I must be missing it but where were we passing isOfficialBuild before? Looks like we were just not passing it and always defaulting to empty here right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm passing it down here: https://github.com/dotnet/runtimelab/pull/261/files#diff-d71a1a613ea5de9e905a5c6f641d8c4c79800b54c4667cbcbefdfb2f91a898ddR57 and then the default of the parameter is set to false: https://github.com/dotnet/runtimelab/pull/261/files#diff-6a89a2c86af1832dfc215647fe7dd379b4def9cea440cf14ef179b65eb55e94aR7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I saw that. I meant before this change, we seem to have been using it to set the enableTelemetry field but we weren't actually setting it on the main yml or importing it unless I'm missing something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see what you're saying. The arcade templates ignore true if it is in an official build. |
||
enableTelemetry: true | ||
helixRepo: dotnet/runtimelab | ||
pool: ${{ parameters.pool }} | ||
enablePublishBuildArtifacts: true | ||
strategy: | ||
matrix: | ||
Release: | ||
_BuildConfig: Release | ||
Debug: | ||
_BuildConfig: Debug | ||
|
||
${{ if eq(parameters.runTests, true) }}: | ||
testResultsFormat: vstest | ||
testRunTitle: ${{ parameters.osGroup }}_${{ parameters.archType }}_$(_BuildConfig) | ||
|
||
${{ if ne(parameters.container, '') }}: | ||
${{ if eq(parameters.container.registry, 'mcr') }}: | ||
container: ${{ format('{0}:{1}', 'mcr.microsoft.com/dotnet-buildtools/prereqs', parameters.container.image) }} | ||
${{ if ne(parameters.container.registry, 'mcr') }}: | ||
container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }} | ||
|
||
variables: | ||
- _buildScript: build.cmd | ||
|
||
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}: | ||
- _buildScript: ./build.sh | ||
|
||
- _testBuildArg: '' | ||
- ${{ if eq(parameters.runTests, true) }}: | ||
- _testBuildArg: -test | ||
|
||
steps: | ||
- script: $(_buildScript) | ||
-ci | ||
$(_testBuildArg) | ||
-c $(_BuildConfig) | ||
/p:TargetPlatform=${{ parameters.archType }} | ||
displayName: Build and Test | ||
enablePublishBuildAssets: true | ||
enablePublishUsingPipelines: true | ||
enableMicrobuild: true | ||
graphFileGeneration: | ||
enabled: false | ||
includeToolset: false | ||
|
||
jobs: | ||
- job: ${{ format('{0}_{1}', parameters.osGroup, parameters.archType) }} | ||
displayName: ${{ format('{0} {1}', parameters.osGroup, parameters.archType) }} | ||
strategy: | ||
matrix: | ||
Release: | ||
_BuildConfig: Release | ||
${{ if eq(parameters.isOfficialBuild, false) }}: | ||
Debug: | ||
_BuildConfig: Debug | ||
|
||
${{ if eq(parameters.runTests, true) }}: | ||
testResultsFormat: vstest | ||
testRunTitle: ${{ parameters.osGroup }}_${{ parameters.archType }}_$(_BuildConfig) | ||
|
||
${{ if ne(parameters.container, '') }}: | ||
${{ if eq(parameters.container.registry, 'mcr') }}: | ||
container: ${{ format('{0}:{1}', 'mcr.microsoft.com/dotnet-buildtools/prereqs', parameters.container.image) }} | ||
${{ if ne(parameters.container.registry, 'mcr') }}: | ||
container: ${{ format('{0}:{1}', parameters.container.registry, parameters.container.image) }} | ||
|
||
variables: | ||
- _buildScript: build.cmd | ||
|
||
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}: | ||
- _buildScript: ./build.sh | ||
|
||
- _testBuildArg: '' | ||
- ${{ if eq(parameters.runTests, true) }}: | ||
- _testBuildArg: -test | ||
|
||
- _officialBuildArgs: '' | ||
- ${{ if eq(parameters.isOfficialBuild, true) }}: | ||
- group: DotNet-Symbol-Server-Pats | ||
- _SignType: real | ||
- _officialBuildArgs: -sign | ||
-publish | ||
/p:DotNetSignType=$(_SignType) | ||
/p:TeamName=$(_TeamName) | ||
/p:OfficialBuildId=$(Build.BuildNumber) | ||
/p:DotNetPublishUsingPipelines=true | ||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) | ||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) | ||
|
||
steps: | ||
- script: $(_buildScript) | ||
-ci | ||
-pack | ||
-c $(_BuildConfig) | ||
$(_testBuildArg) | ||
$(_officialBuildArgs) | ||
/p:TargetPlatform=${{ parameters.archType }} | ||
displayName: Build and Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also enable validation/publishing of symbols or does that happen automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publishing of symbols is already happening. Validation I didn't enable it because I remember there was problems with it due to a delay in the symbol server when you publish new symbols. @riarenas @epananth is that still the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@safern yes, I believe that's still the case.