Team City auto configuration
Answered
I wanted to config team city programmatically in Java (first start config: data dir, db, admin user account). I do it with simulating the browser process forms via http requests. My solution seems working until the last step: creating administrator account. I see here a bit complex logic in JS side, and I'm not sure now I'm able to do that. Could you please help me with that? If it is necessary I can do that with Selenium as well, but it sounds a bit lame to me.
Please sign in to leave a comment.
Hello,
It is possible to perform an unattended TeamCity installation using by using a preconfigured data directory. You can find out more about the topic and follow up in the following youtrack item:
https://youtrack.jetbrains.com/issue/TW-15583
It is also referred in TeamCity old documentation.
Please let me know if you have any more questions.
Thank you,
Guilherme
Hey hey,
Thank you for your answer. So if I understand correctly, I should set up the db (via this command maybe:
), then I have to set to database.properties file the connectionUrl parameter, and I have to turn off maintenance mode with this parameter: teamcity.startup.maintenance.
I found this in the following issue:
https://youtrack.jetbrains.com/issue/TW-38106
Hi!
Those should indeed be the necessary steps.
Please let us know if you were successful or if you have any more questions.
Thank you,
Guilherme
Hey Guilherme,
Thank you, tough the script didn't work, I find out the way via http request to initialize TeamCity.
My other problem is: it is a "versioned settings" menu under the projects. It is a REST API to turn it off/on maybe, or will have you plan it? I would like to use it as well, and avoid this http request way, if it is possible.
Best,
Zsolt
Hello Zsolt,
I am glad that you found a workaround! You should already be able to turn on/off the Versioned Settings by using the edit project feature method from the REST API. You can find more about it in our documentation:
https://www.jetbrains.com/help/teamcity/rest/edit-project-settings.html#Edit+Project+Feature
Please let me know if this works for you.
Thank you,
Guilherme