Skip to content

Switch source-build yamls to 1ES hosted pools#8131

Merged
lpatalas merged 4 commits intodotnet:mainfrom
lpatalas:switch-source-build-to-1es-pools
Nov 4, 2021
Merged

Switch source-build yamls to 1ES hosted pools#8131
lpatalas merged 4 commits intodotnet:mainfrom
lpatalas:switch-source-build-to-1es-pools

Conversation

@lpatalas
Copy link
Contributor

@lpatalas lpatalas commented Nov 3, 2021

This is a follow-up on the previous PR: #8108. This one adds conditionals to make it work both on public and internal projects.

Tracking issue: #7786

@riarenas
Copy link
Contributor

riarenas commented Nov 3, 2021

Have you tried this in an internal build to make sure all the YAML ends up correct?

Copy link
Contributor

@riarenas riarenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a question about changing from ubuntu 20.04 to 18.04, and I'd suggest trying an internal build of this branch just to make sure you don't get bitten by YAML.

# source-build builds run in Docker, including the default managed platform.
defaultContainerHostPool:
vmImage: ubuntu-20.04
${{ if eq(variables['System.TeamProject'], 'public') }}:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

:(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably need to have 2 parameters on that template? For internal and public pool?

Which will probably break someone down the line?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I learned recently about the parameter types in AzDO pipelines and these are the allowed types:
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#parameter-data-types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks like I have to split it into two parameters. I'm not sure who is using it and how so I don't know what will be the impact of this. The name suggests that it may be just some fallback when no other pool is specified.

Does anyone know who may be familiar with this code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially someone from the acquisition team?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this parameter being specified in any repos usage of the template. I am guessing here, but I think this parameter could have possibly been defined as a convenient place to define the default value. I think the best approach is to remove the parameter and define the condition in the single place it is referenced.

Copy link
Contributor Author

@lpatalas lpatalas Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I did exactly that.

I also had to do the same change in source-index-stage1.yml.

@lpatalas
Copy link
Contributor Author

lpatalas commented Nov 4, 2021

I had to switch windows images to Build.Server.Amd64.VS2019(.Open) because we don't have internal version of Build.Windows.10.Amd64.Open. I've run internal build on this branch and it works ok: https://dev.azure.com/dnceng/internal/_build/results?buildId=1454116&view=logs&j=2f0d093c-1064-5c86-fc5b-b7b1eca8e66a.

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change so the source-build job template LGTM.

@lpatalas lpatalas merged commit 670231b into dotnet:main Nov 4, 2021
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.

4 participants