Skip to content

Commit bd6997c

Browse files
Quattro8zoobestik
authored andcommitted
KTL-2775 added build for the kotlin documentation
1 parent 0107986 commit bd6997c

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,58 @@
11
package documentation.builds
22

3+
import documentation.vcsRoots.*
34
import jetbrains.buildServer.configs.kotlin.BuildType
5+
import jetbrains.buildServer.configs.kotlin.buildSteps.script
46

57
object KotlinWithCoroutines: BuildType ({
68
name = "Kotlin Reference with coroutines"
79
description = "Kotlin Reference with coroutines documentation build"
10+
11+
vcs {
12+
root(KotlinReferenceRoot, """
13+
+:docs => docs
14+
+:.git => .git
15+
+:.gitmodules => .gitmodules
16+
+:docs-test-submodule => docs-test-submodule
17+
""".trimIndent())
18+
root(KotlinxCoroutinesRoot,"""
19+
+:docs => kotlinx.coroutines/docs
20+
+:.git => kotlinx.coroutines/.git
21+
""".trimIndent())
22+
root(KotlinxLincheckRoot, """
23+
+:docs => kotlinx-lincheck/docs
24+
+:.git => kotlinx-lincheck/.git
25+
""".trimIndent())
26+
root(DokkaRoot, """
27+
+:docs => dokka/docs
28+
+:.git => dokka/.git
29+
""".trimIndent())
30+
root(APIGuidelinesRoot, """
31+
+:docs => api-guidelines/docs
32+
+:.git => api-guidelines/.git
33+
""".trimIndent())
34+
}
35+
36+
artifactRules = """
37+
artifacts/*
38+
""".trimIndent()
39+
40+
steps {
41+
script {
42+
name = "Build documentation"
43+
scriptContent = """
44+
#!/bin/bash
45+
set -e -x -u
46+
47+
docker run --rm -v %teamcity.build.checkoutDir%/docs:/opt/sources \
48+
registry.jetbrains.team/p/writerside/builder/writerside-builder:latest \
49+
/bin/bash -c "export DISPLAY=:99 && Xvfb :99 & /opt/builder/bin/idea.sh helpbuilderinspect \
50+
--source-dir /opt/sources \
51+
--product kotlin-reference/kr \
52+
--runner teamcity \
53+
--frontend-url https://kotlinlang.org/docs/static/v3/ \
54+
--output-dir /opt/sources/artifacts"
55+
""".trimIndent()
56+
}
57+
}
858
})

.teamcity/documentation/vcsRoots/DocumentationRoots.kt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package documentation.vcsRoots
22

33
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
44

5+
6+
// KmpRoots
57
object KotlinMultiplatformVCS: GitVcsRoot ({
68
name = "Kotlin Multiplatform root"
79
url = "https://github.com/JetBrains/kotlin-multiplatform-dev-docs.git"
@@ -12,3 +14,59 @@ object KotlinMultiplatformVCS: GitVcsRoot ({
1214
uploadedKey = "default teamcity key"
1315
}
1416
})
17+
18+
// Kotlin Reference With Coroutine Roots
19+
object KotlinReferenceRoot: GitVcsRoot ({
20+
name = "Kotlin Reference"
21+
url = "https://github.com/JetBrains/kotlin-web-site.git"
22+
branch = "refs/heads/master"
23+
branchSpec = "+:refs/heads/*"
24+
checkoutPolicy = AgentCheckoutPolicy.AUTO
25+
authMethod = uploadedKey {
26+
uploadedKey = "default teamcity key"
27+
}
28+
})
29+
30+
object KotlinxCoroutinesRoot: GitVcsRoot ({
31+
name = "Kotlinx Coroutines"
32+
url = "https://github.com/Kotlin/kotlinx.coroutines.git"
33+
branch = "refs/heads/master"
34+
branchSpec = "+:refs/heads/*"
35+
checkoutPolicy = AgentCheckoutPolicy.AUTO
36+
authMethod = uploadedKey {
37+
uploadedKey = "default teamcity key"
38+
}
39+
})
40+
41+
object KotlinxLincheckRoot: GitVcsRoot ({
42+
name = "Kotlinx Lincheck"
43+
url = "https://github.com/JetBrains/lincheck.git"
44+
branch = "refs/heads/master"
45+
branchSpec = "+:refs/heads/*"
46+
checkoutPolicy = AgentCheckoutPolicy.AUTO
47+
authMethod = uploadedKey {
48+
uploadedKey = "default teamcity key"
49+
}
50+
})
51+
52+
object DokkaRoot: GitVcsRoot ({
53+
name = "Dokka"
54+
url = "https://github.com/Kotlin/dokka.git"
55+
branch = "refs/heads/master"
56+
branchSpec = "+:refs/heads/*"
57+
checkoutPolicy = AgentCheckoutPolicy.AUTO
58+
authMethod = uploadedKey {
59+
uploadedKey = "default teamcity key"
60+
}
61+
})
62+
63+
object APIGuidelinesRoot: GitVcsRoot ({
64+
name = "API Guidelines"
65+
url = "https://github.com/Kotlin/api-guidelines.git"
66+
branch = "refs/heads/master"
67+
branchSpec = "+:refs/heads/*"
68+
checkoutPolicy = AgentCheckoutPolicy.AUTO
69+
authMethod = uploadedKey {
70+
uploadedKey = "default teamcity key"
71+
}
72+
})

0 commit comments

Comments
 (0)