-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Official Builds With Custom OptProf 'Just Work' #6411
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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,12 +10,28 @@ trigger: | |||||||||||||||||
# SignType: real | ||||||||||||||||||
# SkipApplyOptimizationData: false | ||||||||||||||||||
|
||||||||||||||||||
parameters: | ||||||||||||||||||
- name: OptProfDropName | ||||||||||||||||||
displayName: Optional OptProfDrop Override | ||||||||||||||||||
type: string | ||||||||||||||||||
default: 'default' | ||||||||||||||||||
|
||||||||||||||||||
variables: | ||||||||||||||||||
# if OptProfDrop is not set, string '$(OptProfDrop)' will be passed to the build script. | ||||||||||||||||||
- name: OptProfDrop | ||||||||||||||||||
value: '' | ||||||||||||||||||
- name: SourceBranch | ||||||||||||||||||
value: $(IbcSourceBranchName) | ||||||||||||||||||
- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/exp/') }}: | ||||||||||||||||||
# If we're not on a vs* branch, use main as our optprof collection branch | ||||||||||||||||||
- ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs')) }}: | ||||||||||||||||||
- name: SourceBranch | ||||||||||||||||||
value: main | ||||||||||||||||||
# if OptProfDropName is set as a parameter, set OptProfDrop to the parameter and unset SourceBranch | ||||||||||||||||||
- ${{ if ne(parameters.OptProfDropName, 'default') }}: | ||||||||||||||||||
- name: OptProfDrop | ||||||||||||||||||
value: ${{parameters.OptProfDropName}} | ||||||||||||||||||
- name: SourceBranch | ||||||||||||||||||
value: '' | ||||||||||||||||||
Comment on lines
+30
to
+34
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 know pretty much nothing about yml. Curious, why this can't be done with
Suggested change
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. The main thing to solve with So I have that
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. Makes perfect sense, thank you! 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. Note that this isn't so much about "YAML" as about "Azure DevOps Pipelines YAML" which is similar to "GitHub Actions YAML" but (maybe?) not exactly the same. Having been in Ben's position I completely empathize with
! |
||||||||||||||||||
- name: _DotNetArtifactsCategory | ||||||||||||||||||
value: .NETCore | ||||||||||||||||||
- name: _DotNetValidationArtifactsCategory | ||||||||||||||||||
|
@@ -100,7 +116,7 @@ stages: | |||||||||||||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) | ||||||||||||||||||
/p:TeamName=MSBuild | ||||||||||||||||||
/p:DotNetPublishUsingPipelines=true | ||||||||||||||||||
/p:VisualStudioIbcDrop=$(OptProfDropName) | ||||||||||||||||||
/p:VisualStudioIbcDrop=$(OptProfDrop) | ||||||||||||||||||
displayName: Build | ||||||||||||||||||
condition: succeeded() | ||||||||||||||||||
|
||||||||||||||||||
|
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.
🙌🏻 we can promote these now too! I'll send the PR after this one goes in.
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.
I considered promoting the other vars but realized I only ever changed the value of
SkipApplyOptimizationData
once ever 🤷♂️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.
It doesn't appear to have worked so looks like you were totally right. https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=4728100&view=logs&j=bb592630-4b9d-53ad-3960-d954a70a95cf&t=bb592630-4b9d-53ad-3960-d954a70a95cf
🙇🏻♂️
That one is helpful to bootstrap from nothing to get a build from which you can collect updated optprof data. But in no other circumstance. And SignType is basically never helpful. So I'm going to stop bothering.
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.
For whoever decides to do this in the future:
I think it's because the call to CIBuild.cmd needs to be updated to take the pipeline parameter directly. Or some script variable needs be created to take in that value?
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.
the call already takes the pipeline parameter, right? My untested pet theory was that it was because it was defined twice, once in the YAML and once in the AzDO metadata.
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.
I want to say that's runtime variable syntax and that syntax doesn't work with compile time variables and blarg 🙃
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.
Bingo bango! #6415