![]() Check the Delay execution of subsequent rule actions until we've received a response for this webhook checkbox.Replace the placeholder with the actual Access Token created at step 2. Replace the placeholder with your actual TeamCity base URL.Īdd a header with the name "Authorization" and with the value of "Bearer ". If you are using an older TeamCity version which does not support CSRF protection (or it's disabled), skip these steps and continue with step 12.Select the trigger Changeset accepted (from the DevOps category).Login to Jira as admin, go to Administration → System → Automation rules.If your TeamCity version does not support Access Tokens, continue with step 4.Įnter a token name in the Token name field.Ĭopy the generated token, because it cannot be recovered in the future. Login to TeamCity as admin, go to your profile → My Settings & Tools → Access Tokens. It starts the build once per changeset, after all the commits in the changeset are already in the repository. It is the simplest way to integrate TeamCity to your DevOps pipeline. ![]() This automation starts a TeamCity build when a new changeset is received. If using a continuous integration tool different to TeamCity, as long as it supports any of the build tools, or calling command line tools, compiling Kotlin and automating things as part of a CI process should be possible.Starting a TeamCity build after every changeset With that, our project should now build and produce the corresponding artifacts. The final step is to define the actual compilation of the project, which uses the standard IntelliJ IDEA Runner Type. Therefore, you need to define it as a system variable. However, this value needs to be defined in TeamCity (and can be set to any value). The runner will set the value for the property .BUNDLED to the correct one based on the path settings from the IntelliJ IDEA project. Download that meta-runner and import it from the TeamCity user interface Setup Kotlin compiler fetching stepīasically this step is limited to defining the Step Name and the version of Kotlin you need. The meta-runner for Kotlin is available on GitHub. They are very easy and powerful way to introduce custom Runners without the need to write plugins. If not familiar with the concept of TeamCity meta-runners, check the documentation. You may need to download the specific version of the Kotlin plugin and install it on TeamCity.įortunately, there is a meta-runner already available that takes care of most of the manual work. ![]() If using IntelliJ IDEA build system with TeamCity, make sure that the version of Kotlin being used by IntelliJ IDEA is the same as the one that TeamCity runs. The only difference being that the Runner Type would be Ant or Maven respectively. If using Ant or Maven, the same configuration applies. Since all the dependencies required for Kotlin are defined in the Gradle file, nothing else needs to be configured specifically for Kotlin to run correctly. For example, if using Gradle, simply define the required parameters such as the Step Name and Gradle tasks that need executing for the Runner Type. All that is needed is to define the Build Step. If using Ant, Maven or Gradle, the setup process is straightforward. Where there are some minor requirements and differences is when using the internal build system of IntelliJ IDEA, which is also supported on TeamCity. Kotlin works with different build tools, so if you're using a standard tool such as Ant, Maven or Gradle, the process for setting up a Kotlin project is no different to any other language or library that integrates with these tools. For more information and basics of TeamCity please check the Documentation page which contains information about installation, basic configuration, etc. On this page, you'll learn how to set up TeamCity to build your Kotlin project. Kotlin and continuous integration with TeamCity
0 Comments
Leave a Reply. |