diff --git a/.teamcity/.gitignore b/.teamcity/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/.teamcity/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/.teamcity/pom.xml b/.teamcity/pom.xml new file mode 100644 index 0000000..50ed92a --- /dev/null +++ b/.teamcity/pom.xml @@ -0,0 +1,104 @@ + + + 4.0.0 + Mbeddr_Tooling_MpsGradlePlugin Config DSL Script + Mbeddr_Tooling_MpsGradlePlugin + Mbeddr_Tooling_MpsGradlePlugin_dsl + 1.0-SNAPSHOT + + + org.jetbrains.teamcity + configs-dsl-kotlin-parent + 1.0-SNAPSHOT + + + + + jetbrains-all + https://download.jetbrains.com/teamcity-repository + + true + + + + teamcity-server + https://mps.builds.itemis.cloud/app/dsl-plugins-repository + + true + + + + + + + JetBrains + https://download.jetbrains.com/teamcity-repository + + + + + ${basedir} + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + + + compile + process-sources + + compile + + + + test-compile + process-test-sources + + test-compile + + + + + + org.jetbrains.teamcity + teamcity-configs-maven-plugin + ${teamcity.dsl.version} + + kotlin + target/generated-configs + + + + + + + + org.jetbrains.teamcity + configs-dsl-kotlin-latest + ${teamcity.dsl.version} + compile + + + org.jetbrains.teamcity + configs-dsl-kotlin-plugins-latest + 1.0-SNAPSHOT + pom + compile + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${kotlin.version} + compile + + + org.jetbrains.kotlin + kotlin-script-runtime + ${kotlin.version} + compile + + + diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts new file mode 100644 index 0000000..de15898 --- /dev/null +++ b/.teamcity/settings.kts @@ -0,0 +1,94 @@ +import jetbrains.buildServer.configs.kotlin.* +import jetbrains.buildServer.configs.kotlin.buildFeatures.commitStatusPublisher +import jetbrains.buildServer.configs.kotlin.buildSteps.gradle +import jetbrains.buildServer.configs.kotlin.triggers.vcs + +version = "2025.11" + +project { + buildType(BuildPlugin) + buildType(BuildGitBasedVersioning) +} + +object BuildPlugin : BuildType({ + id("MpsGradlePlugin") + name = "mps-gradle-plugin" + + vcs { + root(AbsoluteId("Mbeddr_Tooling_MpsGradlePlugin")) + } + + params { + param("env.BUILD_COUNTER", "%build.counter%") + } + + steps { + gradle { + name = "Build" + tasks = "setTeamCityBuildNumber build" + jdkHome = "%env.JDK_17_0_x64%" + useGradleWrapper = true + } + gradle { + name = "Publish" + tasks = "publish" + jdkHome = "%env.JDK_17_0_x64%" + useGradleWrapper = true + } + } + + triggers { + vcs { + branchFilter = """ + +:* + -:pull/* + """.trimIndent() + } + } + + features { + commitStatusPublisher { + vcsRootExtId = "Mbeddr_Tooling_MpsGradlePlugin" + publisher = github { + githubUrl = "https://api.github.com" + authType = personalToken { + token = "%system.github.token%" + } + } + } + } + + requirements { + doesNotContain("teamcity.agent.hostname", "nonspot") + } +}) + +object BuildGitBasedVersioning : BuildType({ + id("GitBasedVersioning") + name = "git-based-versioning" + description = "Part of mps-gradle-plugin, published separately because it rarely changes and uses a separate, explicitly set version number." + + templates(AbsoluteId("RequiresMpsExtions")) + + vcs { + root(AbsoluteId("Mbeddr_Tooling_MpsGradlePlugin")) + } + + steps { + gradle { + name = "Build and publish git-based-versioning" + tasks = ":git-based-versioning:build :git-based-versioning:publish" + jdkHome = "%env.JDK_17_0_x64%" + useGradleWrapper = true + param("teamcity.coverage.emma.include.source", "true") + param("teamcity.coverage.emma.instr.parameters", "-ix -*Test*") + param("teamcity.coverage.idea.includePatterns", "*") + param("teamcity.coverage.jacoco.patterns", "+:*") + param("teamcity.tool.jacoco", "%teamcity.tool.jacoco.DEFAULT%") + } + } + + requirements { + doesNotContain("teamcity.agent.hostname", "nonspot") + } +})