From 10319f382759a03a8b13ab8def899d06fd9ccdc9 Mon Sep 17 00:00:00 2001 From: "Andrey.Kokorev" Date: Wed, 25 Sep 2024 11:13:12 +0200 Subject: [PATCH] Add qodana build for code analysis --- .teamcity/settings.kts | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index 5717063..2df3ddc 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -1,8 +1,11 @@ import jetbrains.buildServer.configs.kotlin.* import jetbrains.buildServer.configs.kotlin.buildFeatures.PullRequests import jetbrains.buildServer.configs.kotlin.buildFeatures.pullRequests +import jetbrains.buildServer.configs.kotlin.buildSteps.Qodana import jetbrains.buildServer.configs.kotlin.buildSteps.gradle +import jetbrains.buildServer.configs.kotlin.buildSteps.qodana import jetbrains.buildServer.configs.kotlin.buildSteps.script +import jetbrains.buildServer.configs.kotlin.triggers.schedule import jetbrains.buildServer.configs.kotlin.triggers.vcs version = "2023.05" @@ -143,6 +146,53 @@ project { } } + buildType { + id("SecurityCheck") + name = "Security check with Qodana" + + vcs { + cleanCheckout = true + root(DslContext.settingsRoot) + } + + triggers { + vcs { + branchFilter = """ + +: + +:pull/* + """.trimIndent() + } + + schedule { + daily { + hour = 8 + } + + branchFilter = "+:" + } + } + + features { + pullRequests { + provider = github { + authType = vcsRoot() + filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER_OR_COLLABORATOR + ignoreDrafts = true + } + } + } + + steps { + qodana { + linter = jvm { + version = Qodana.JVMVersion.LATEST + } + inspectionProfile = default() + param("report-as-test-mode", "each-problem-is-test") + } + } + } + buildType { id("Publish") name = "Publish to Space"