Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

KPI Dashboard: refactor the TeamCity configuration E2EBuildType #69801

Open worldomonation opened 1 year ago

worldomonation commented 1 year ago

Details

In order to define custom steps, it was necessary to revert the build configuration for Pre-Release Tests to a non-templated configuration.

Look at refactoring the E2EBuildType into either:

Checklist

No response

Related

No response

noahtallen commented 1 year ago

For context, the wpcom plugins build does accept extra steps. I originally tried to write it as a configuration template, but that didn't work how I expected (for reasons I can't remember unfortunately). Thankfully, it was really easy to add like this:

You can write build steps like this, just putting the steps inside of another function:

https://github.com/Automattic/wp-calypso/blob/18e3abbec52735a84159b85264268fffcd09a732/.teamcity/_self/projects/WPComPlugins.kt#L70-L79

Then, buildSteps is added to the class constructor:

https://github.com/Automattic/wp-calypso/blob/995c4110429deb47ea3911a6f789b299d3d06558/.teamcity/_self/lib/wpcom/WPComPluginBuild.kt#L25

You can call buildSteps inline like this, right where you'd normally define a new step:

https://github.com/Automattic/wp-calypso/blob/995c4110429deb47ea3911a6f789b299d3d06558/.teamcity/_self/lib/wpcom/WPComPluginBuild.kt#L116

I feel like you could accomplish this without a huge refactor