Proper script editor

I keep writing more and more complex scripts in the little “Script Source” window.  It is becoming increasingly inconvenient. It is impossible to make larger. But, especially, it doesn't provide any help as a regular script editor does. There is a bit of highlighting. But there is not syntax checking or help.

Will it be possible to make the “Script Source” window proper feature-rich script editor? Otherwise I have to develop in VSCode and then copy the code back to TeamCity.

 

0
7 comments
Hi Ilya,

Could you provide the details on which "Script Source" window you are mentioning? Please provide the screenshot if possible.

Best regards,
Anton
0

Hi Anton:

This is the “Script Source:” in the PowerShell or Bash runners.

0
Dear Ilya,

It is intended to be used for simple commands, not for complex scripts that may benefit from having IDE-like features.
For more complex scripts, I recommend saving the script in a file in the repository, selecting Script: File, and specifying the file path.

Best regards,
Anton
0

Hi Anton:

You are right. But my main code requires a lot of steps to change. Thus it is much easier to add and change the functionality inside the TeamCity script. Having said that: even for a very short script, it would be useful (i.e. it will save users several potentially long test runs) to have a simple script syntax checker in that editor window.

Another question: is there a way to repeat the same step in different steps of a run? For example: I have a power cycle step. It is step 1. But I want to run it after step 2 and after step 3. Can I just specify that at some step re-run step 1? Basically, like a subroutine.

 

Thank you.

-Ilya

0
Dear Ilya,

I have created a feature request: https://youtrack.jetbrains.com/issue/TW-88386. Please vote for it and subscribe to receive notifications.
There is no option to reuse build steps in the same build configuration, so you would need to add new build steps in a linear fashion. In this case, running the script from a file in the repo would also be useful: to change the script's contents, you would need to change them only once and not in each build step.
Another option that may be useful if you need to reuse the same build steps is meta-runners: https://www.jetbrains.com/help/teamcity/working-with-meta-runner.html.

Best regards,
Anton
0
Dear Ilya,

Another option I would like to add here is Kotlin DLS, where you can declare cycles and repetitive blocks that may suit your requirements: https://www.jetbrains.com/help/teamcity/kotlin-dsl.html.

Best regards,
Anton
0

Hi Anton:

Thank you for the support and the new feature.  I hope it'll be popular.

Regards,

-Ilya.

0

Please sign in to leave a comment.