Skip to content
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

Source-build template default pool fix; clean up parameters #6790

Merged
merged 3 commits into from Jan 14, 2021

Conversation

dagood
Copy link
Member

@dagood dagood commented Jan 13, 2021

Fixes dotnet/source-build#1795 by always setting the vm image to ubuntu-20.04 by default.

Incorporates suggestions from @tmat based on dotnet/sourcelink#690 (thanks!):

  • Rename runSourceBuild -> enableSourceBuild.
    • Also bring the parameter up closer to the enable properties away from the other run property. enable is much more common for this kind of flag and will fit in nicer.
  • Use default platform if and only if 0 platforms are passed.
    • This simplifies the implementation from 3 lines to 1 line of code for ordinary, managed-only, arcade-using repos.
    • This removes the ability to use the default platform if you're also passing in your own platforms. However, this functionality is probably not useful enough to justify the extra lines in ordinary repos. If a repo defines its own platforms, it's only a few more lines to include a copy of the default platform. (This copy won't receive auto-updates, but the custom platforms won't receive auto-updates either, so this seems like a non-issue in context.)
      • It might not be hard to bring this back with some extra conditions, but it doesn't seem worth the yml template bloat.

Only one repo uses these templates/parameters so far (dotnet/source-build-reference-packages) so I'm not concerned about this being a breaking change.

@dagood dagood self-assigned this Jan 13, 2021
@dagood dagood merged commit 9d3c957 into dotnet:master Jan 14, 2021
@dagood dagood deleted the sb-template-fixes branch January 14, 2021 19:29
akoeplinger pushed a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
)

* Rename runSourceBuild -> enableSourceBuild

The 'enable*' properties are more common.

* Set up default container host pool

* Use default platform iff 0 platforms passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix dependence on ambient default agent pool in arcade-powered source-build AzDO templates
2 participants