proliner.blogg.se

Teamcity kotlin dsl
Teamcity kotlin dsl









  1. #TEAMCITY KOTLIN DSL HOW TO#
  2. #TEAMCITY KOTLIN DSL UPDATE#

In this form, we enable synchronization, specify the git repository (blog-helm) to use, select ‘use settings from VCS’ and finally use the Kotlin format: Versioned Settings - After the changes In TeamCity, the project had two build configurations: Project with two build configurationsįirst, edit the project and find the versioned settings section: Versioned Settings - Before the changes I’m going to use the blog-helm project that I had configured in the CD with Helm series. And all that is supported in a way that you don’t have to give up the user friendly way of defining your build via the UI. It allows to make changes to the pipeline without affecting other branches. This allows you to change your build configuration in the same way you change your code, via a pull request.

#TEAMCITY KOTLIN DSL HOW TO#

This is the general idea but not complete, by spending time getting this script out of the way you'll save a lot of time managing it via TeamCity UI.In this post, I’ll show how to setup TeamCity so that your project’s build configurations are stored in your git repository. Set the agent requirement on the build configurations.įor each build configuration, in each project, set the agent requirements on the build configuration using the parsed out XX_VERSION value curl -X PUT -user username:password.Loop over all projects, get all parameters and parse our XXX_VERSION curl Get the XXX_VERSION parameter from the projects.Get the list of projects curl -i -H "Accept: application/json" -user username:password You'll write a single script (in whatever scripting language you're comfortable using) that you can run once to set all the agent requirements.

#TEAMCITY KOTLIN DSL UPDATE#

In this case, I think it would be worth your time to write a script to avoid having to go through the UI to update all the build configurations you mentioned. You can interact with the API using your preferred scripting language using HTTP GET/PUT calls to get and update values. Why not automate this using TeamCity's REST API? TeamCity's server has a built in HTTP API that you can use to edit/update (almost) any of the fields you would be able to using the web interface. It seems like you already know what you want to do and the issue is the large number of agents and configurations that you need to deal with.

teamcity kotlin dsl

(Today, all our agents includes all possible versions of the software, but will no longer be possible, so we will need requirements on the agents from the projects of build configurations)

teamcity kotlin dsl

But given the number of build configurations and the number of variant projects, I would prefer to parameterize the requirement on the value of the exiting env.XXX_VERSION. Now I also would like to include an agent requirement from all the relevant build configurations in the project so only the usable agents will be considered. (Over time we make copies of this build project for different variants of some of the products we depend on, so we now have 12 different projects with different values for the parameters). We can then use this value in the relevant build scripts of the project. can value include %.% substitutions?Īn example: we have a project parameters env.XXX_VERSION which specifies the needed version of the XXX product in all the build configurations of the project.

teamcity kotlin dsl

In TeamCity, is it possible to parameterize the agent requirements based on project or build configuration parameters? E.g.











Teamcity kotlin dsl