Execute plugin step from script
Hello! We use plugin presidentio/teamcity-matrix-build-plugin to run automatic tests. And we try to store all teamcity configuration steps as a code.
We use only 1 build step in each configuration, and this step includes PowerShell scirpt (stored in repo) with set of commands.
Can I execute Matrix build plugin from this script? May be use java or something else?
Thanks!
Please sign in to leave a comment.
Hi,
I'm not exactly sure what you are trying to accomplish here. You currently have only 1 build step, and it's a powershell script. Do you want to add a new step, or replace the powershell with the matrix build? Or is it something else that you want?
Adding a Matrix step will not be possible directly, I'm afraid. We don't currently support third party plugins via the DSL, please watch and vote here for adding support for it: https://youtrack.jetbrains.com/issue/TW-54064
If all builds will have the same amount of steps with a similar configuration, then there should be an easy workaround:
-Extract a template out of the build configuration with the shared settings to all configurations. At the very least, include the build step of the matrix plugin.
-All parameters that need to be addressed differently in builds, set them as build parameters: https://www.jetbrains.com/help/teamcity/configuring-build-parameters.html
-Either set this template to be the default template for the project where all the builds are (this is inherited through the hierarchy, so if they are in subprojects it will also be applied), or set the build configurations you need to use this template.
With this, you don't need to reference the matrix plugin in the DSL, but you will still be able to use it. If what you need to do is something else, I'm afraid you will need to be more specific as I'm not sure I know what it is.