-
Notifications
You must be signed in to change notification settings - Fork 361
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
phases to jobs schema change #1344
Conversation
azure-pipelines.yml
Outdated
@@ -0,0 +1,112 @@ | |||
variables: | |||
- name: _HelixType | |||
value: build/product |
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.
build/product [](start = 11, length = 13)
Could you please make this build/product/ so the classifier tool finds failed builds? Also, most of the other repos also do build/product/
#Resolved
eng/common/templates/jobs/base.yml
Outdated
# 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, |
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.
, [](start = 26, length = 1)
'.' ?
In general looks good. What's the plan on removing |
No current plan. I think that we could set a date some time early next year to delete that folder if it's a problem. I imagine that BYOC is going to force everyone to move out of phases and into job sooner than later. |
I don't think there is a problem only not to forget that those would be orphaned files. BYOC should serve as a reminder then |
/cc @riarenas |
eng/common/templates/jobs/base.yml
Outdated
# Optional: If specified, | ||
helixRepo: '' | ||
|
||
publishBuildAssetsDependsOn: '' |
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.
publishBuildAssetsDependsOn: '' [](start = 1, length = 32)
This one is missing a description
@@ -1,98 +0,0 @@ | |||
parameters: |
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.
LGTM. Do you plan to make the documentation changes as part of this PR, or create a followup issue/pr for that? |
I'm going to include some documentation with this PR so that I don't have to hand-hold everyone through consuming this change. I wanted to get feedback on the direction before writing anything. |
Ooh. I think it'll help people if once this is in, we make a PR to the minimalci-sample repo and reference the commit from our docs. That will give them an idea of what the transition entails. |
Also, I'm trying to think of better names than |
@chcosta taking a look now |
- name: _HelixBuildConfig | ||
value: $(_BuildConfig) | ||
# Only enable publishing in non-public, non PR scenarios. | ||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
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.
Given that these are likely going to be identical between a lot of repos, would it make more sense to pull these variables into a template?
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.
_HelixBuildConfig
makes sense and could easily be moved into job\base.yml
.
I can't decide if _PublishBlobFeedUrl
, _SignArgs
, _PublishArgs
, and _OfficialBuildIdArgs
makes sense. I guess it's optional whether a repo actually uses those values (though they couldn't redefine them). Alternatively, they could be provided behind some other parameter (enableDefaultArgs
or something), but that feels a bit overly magical. I guess, because of dependency flow it's all in your local repo and that takes some of the magic out.
I'm conflicted, because it would clean up azure-pipelines.yml
, but then things are a little weird in the sense that this code block
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
$(_PublishArgs)
$(_SignArgs)
$(_OfficialBuildIdArgs)
makes no sense at all unless you go look at another file, plus we're forced into a tighter contract where we will define those args in the base templates until the end of time or risk breaking some repo.
My preference, for now, is to move _HelixBuildConfig
but leave the rest up to the repo to define.
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.
Yeah that's a good point.
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 will eventually be removing all these publishing steps, since they will go into a release pipebuild after BAR publish. It will probably eventually just say something like "publishPackages=true, publishSymbols=true"
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 like that direction
I'll merge this in the morning and then kick off builds / look for issues. Tuesday (11/27), I'll write up some documentation on this change cuz I'm sure it won't be obvious to people when to use |
cc/ @garath |
Fixes https://github.com/dotnet/core-eng/issues/4560
@mmitche
I'm open to feedback on this, but here's my current thinking for handling the phases -> jobs breaking schema change and enabling other breaking changes as well.
eng\common\templates\phases\base.yml
roughly translates toeng\common\templates\job\base.yml
For teams that want to maintain the pattern we previously established which is something like...
… they can continue that pattern with slight modification to some parameters but essentially looks like...
Another pattern, the pattern I'm moving dotnet/Arcade to, is to try to simplify your entry yml file such that you don't need to have the
eng\build.yml
layer or explicitly includepublish-build-assets.yml
Notice that
jobs\base.yml
as opposed tojob\base.yml
is referenced.jobs\base.yml
wrapsjob\base.yml
but uses "each" to modify the passed jobs and to automatically handle the dependency stuff for "publish-build-assets.yml"For variables, notice that I'm moving from treating them as an object to the slightly uglier array syntax but that is so that we can support variable groups via yaml.
@vtbassmatt for any additional feedback
I'll be adding others for additional feedback but I wanted to get your thoughts first @mmitche @vtbassmatt