Space Automation is a CI/CD tool that helps you automate development workflows in the JetBrains Space environment. This section explains how you can configure and run Qodana Docker images within Space Automation jobs.
Prepare your project
Assuming that your JetBrains Space account already has a project and a repository, in the project root create the
.space.kts file. This file will contain configuration scripts written in Kotlin and mentioned in this section.
This is the basic configuration script for running Qodana in JetBrains Automation jobs.
QODANA_TOKEN variable refers to the project token generated in Qodana Cloud and contained in the
qodana-token secret. This token is required by the paid Qodana linters, and is optional for using with the Community linters. You can see these sections to learn how to generate the project token:
The Onboarding section explains how to get the project token generated while first working with Qodana Cloud
The Manage a project section explains how to create a project in the existing Qodana Cloud organization
Once the project token is generated, in the Settings section of your JetBrains Space environment create a secret with the
qodana-token name. Save the project token as the value for this secret.
Inspect specific branches
startOn block lets you specify the event that will trigger a job. This configuration uses the nested
branchFilter block to override the default trigger and run the job only after changes made in the
codeReviewOpened trigger lets you inspect code reviews opened in the default branch of the project.