Skip to content

Commit 6722c52

Browse files
committed
Second try, update vcs root settings
1 parent 433070c commit 6722c52

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.teamcity/settings.kts

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import jetbrains.buildServer.configs.kotlin.AbsoluteId
12
import jetbrains.buildServer.configs.kotlin.BuildFeatures
23
import jetbrains.buildServer.configs.kotlin.BuildType
3-
import jetbrains.buildServer.configs.kotlin.DslContext
44
import jetbrains.buildServer.configs.kotlin.FailureAction
55
import jetbrains.buildServer.configs.kotlin.buildFeatures.PullRequests
66
import jetbrains.buildServer.configs.kotlin.buildFeatures.commitStatusPublisher
@@ -10,6 +10,7 @@ import jetbrains.buildServer.configs.kotlin.buildSteps.gradle
1010
import jetbrains.buildServer.configs.kotlin.project
1111
import jetbrains.buildServer.configs.kotlin.projectFeatures.githubIssues
1212
import jetbrains.buildServer.configs.kotlin.triggers.vcs
13+
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
1314
import jetbrains.buildServer.configs.kotlin.version
1415

1516
/*
@@ -36,8 +37,21 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
3637

3738
version = "2023.11"
3839

40+
object AnvilVcsRoot : GitVcsRoot() {
41+
init {
42+
id = AbsoluteId("anvil_git")
43+
name = "anvil"
44+
url = "https://github.com/anvilpowered/anvil.git"
45+
branch = "refs/heads/master"
46+
branchSpec = "+:refs/heads/*"
47+
userNameStyle = UserNameStyle.FULL
48+
}
49+
}
50+
3951
project {
4052

53+
vcsRoot(AnvilVcsRoot)
54+
4155
val test = Test()
4256
val style = Style()
4357
val pluginJar = PluginJar()
@@ -54,7 +68,7 @@ project {
5468
displayName = "anvilpowered/anvil"
5569
repositoryURL = "https://github.com/anvilpowered/anvil"
5670
authType = accessToken {
57-
accessToken = "credentialsJSON:7a0f679e-94e2-4f3e-b19a-db375294d40e"
71+
accessToken = "credentialsJSON:f57a4fdd-fb30-41c0-9983-620364336d03"
5872
}
5973
param("tokenId", "")
6074
}
@@ -63,7 +77,7 @@ project {
6377

6478
fun BuildType.configureVcs() {
6579
vcs {
66-
root(DslContext.settingsRoot)
80+
root(AnvilVcsRoot)
6781
}
6882
}
6983

@@ -83,22 +97,22 @@ fun BuildType.configureTriggers() {
8397
fun BuildFeatures.configureBaseFeatures() {
8498
perfmon {}
8599
commitStatusPublisher {
86-
vcsRootExtId = "${DslContext.settingsRoot.id}"
100+
vcsRootExtId = "${AnvilVcsRoot.id}"
87101
publisher = github {
88102
githubUrl = "https://api.github.com"
89103
authType = personalToken {
90-
token = "credentialsJSON:7a0f679e-94e2-4f3e-b19a-db375294d40e"
104+
token = "credentialsJSON:f57a4fdd-fb30-41c0-9983-620364336d03"
91105
}
92106
}
93107
}
94108
}
95109

96110
fun BuildFeatures.configurePullRequests() {
97111
pullRequests {
98-
vcsRootExtId = "${DslContext.settingsRoot.id}"
112+
vcsRootExtId = "${AnvilVcsRoot.id}"
99113
provider = github {
100114
authType = token {
101-
token = "credentialsJSON:7a0f679e-94e2-4f3e-b19a-db375294d40e"
115+
token = "credentialsJSON:f57a4fdd-fb30-41c0-9983-620364336d03"
102116
}
103117
filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER_OR_COLLABORATOR
104118
}

0 commit comments

Comments
 (0)