Skip to content

Commit 16512ea

Browse files
authored
Merge pull request #4990 from JetBrains/documentation-front-fix
Documentation Frontend Per Instance
1 parent 383f237 commit 16512ea

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

.teamcity/documentation/builds/KotlinMultiplatform.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package documentation.builds
22

33
import documentation.vcsRoots.KotlinMultiplatformVCS
4+
import jetbrains.buildServer.configs.kotlin.CheckoutMode
45

56
object KotlinMultiplatform: WritersideBuilder (
67
module = "kotlin-multiplatform-docs",
@@ -10,6 +11,7 @@ object KotlinMultiplatform: WritersideBuilder (
1011
vcs {
1112
root(KotlinMultiplatformVCS)
1213
cleanCheckout = true
14+
checkoutMode = CheckoutMode.ON_AGENT
1315
}
1416
}
1517
)

.teamcity/documentation/builds/KotlinWithCoroutines.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package documentation.builds
22

33
import documentation.vcsRoots.*
4+
import jetbrains.buildServer.configs.kotlin.CheckoutMode
5+
46
//import jetbrains.buildServer.configs.kotlin.BuildType
57
//import jetbrains.buildServer.configs.kotlin.FailureAction
68
//import jetbrains.buildServer.configs.kotlin.buildSteps.script
@@ -15,7 +17,6 @@ object KotlinWithCoroutines: WritersideBuilder(
1517
+:docs => docs
1618
+:.git => .git
1719
+:.gitmodules => .gitmodules
18-
+:docs-test-submodule => docs-test-submodule
1920
""".trimIndent())
2021
root(KotlinxCoroutinesRoot,"""
2122
+:docs => kotlinx.coroutines/docs
@@ -33,6 +34,9 @@ object KotlinWithCoroutines: WritersideBuilder(
3334
+:docs => api-guidelines/docs
3435
+:.git => api-guidelines/.git
3536
""".trimIndent())
37+
38+
checkoutMode = CheckoutMode.ON_AGENT
39+
cleanCheckout = true
3640
}
3741
}
3842
)

.teamcity/documentation/builds/WritersideBuilder.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package documentation.builds
22

33
import jetbrains.buildServer.configs.kotlin.BuildType
44
import jetbrains.buildServer.configs.kotlin.buildSteps.script
5+
import kotlinlang.builds.BuildWebHelpFrontend
56

67
abstract class WritersideBuilder(
78
module: String,
89
instance: String,
910
customInit: BuildType.() -> Unit = {}
1011
): BuildType({
1112
val dockerImageTag = "2.1.2176-p8483"
12-
val frontend = "https://kotlinlang.org/docs/static/v3/"
13+
val frontend = "file:///opt/static/"
1314

1415
name = "${instance.uppercase()} documentation build"
1516
description = "Build $module/$instance documentation with the docker"
@@ -21,8 +22,10 @@ abstract class WritersideBuilder(
2122
steps {
2223
script {
2324
name = "Build $module/$instance documentation with the docker"
25+
// language=sh
2426
scriptContent = """
2527
docker run --rm -v %teamcity.build.checkoutDir%:/opt/sources \
28+
-v %teamcity.build.checkoutDir%/static:/opt/static \
2629
-e SOURCE_DIR=/opt/sources \
2730
-e MODULE_INSTANCE=$module/$instance \
2831
-e RUNNER=teamcity \
@@ -37,5 +40,17 @@ abstract class WritersideBuilder(
3740
equals("container.engine","docker")
3841
}
3942

43+
failureConditions {
44+
testFailure = false
45+
}
46+
47+
dependencies {
48+
artifacts(BuildWebHelpFrontend) {
49+
buildRule = lastPinned("+:*")
50+
cleanDestination = true
51+
artifactRules = "+:static.zip!** => static/"
52+
}
53+
}
54+
4055
customInit()
4156
})

.teamcity/documentation/vcsRoots/DocumentationRoots.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object KotlinMultiplatformVCS: GitVcsRoot ({
99
url = "https://github.com/JetBrains/kotlin-multiplatform-dev-docs.git"
1010
branch = "refs/heads/master"
1111
branchSpec = "+:refs/heads/*"
12-
checkoutPolicy = AgentCheckoutPolicy.AUTO
12+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
1313
authMethod = uploadedKey {
1414
uploadedKey = "default teamcity key"
1515
}
@@ -21,7 +21,8 @@ object KotlinReferenceRoot: GitVcsRoot ({
2121
url = "https://github.com/JetBrains/kotlin-web-site.git"
2222
branch = "refs/heads/master"
2323
branchSpec = "+:refs/heads/*"
24-
checkoutPolicy = AgentCheckoutPolicy.AUTO
24+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
25+
checkoutSubmodules = CheckoutSubmodules.SUBMODULES_CHECKOUT
2526
authMethod = uploadedKey {
2627
uploadedKey = "default teamcity key"
2728
}
@@ -32,7 +33,7 @@ object KotlinxCoroutinesRoot: GitVcsRoot ({
3233
url = "https://github.com/Kotlin/kotlinx.coroutines.git"
3334
branch = "refs/heads/master"
3435
branchSpec = "+:refs/heads/*"
35-
checkoutPolicy = AgentCheckoutPolicy.AUTO
36+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
3637
authMethod = uploadedKey {
3738
uploadedKey = "default teamcity key"
3839
}
@@ -43,7 +44,7 @@ object KotlinxLincheckRoot: GitVcsRoot ({
4344
url = "https://github.com/JetBrains/lincheck.git"
4445
branch = "refs/heads/master"
4546
branchSpec = "+:refs/heads/*"
46-
checkoutPolicy = AgentCheckoutPolicy.AUTO
47+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
4748
authMethod = uploadedKey {
4849
uploadedKey = "default teamcity key"
4950
}
@@ -54,7 +55,7 @@ object DokkaRoot: GitVcsRoot ({
5455
url = "https://github.com/Kotlin/dokka.git"
5556
branch = "refs/heads/master"
5657
branchSpec = "+:refs/heads/*"
57-
checkoutPolicy = AgentCheckoutPolicy.AUTO
58+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
5859
authMethod = uploadedKey {
5960
uploadedKey = "default teamcity key"
6061
}
@@ -65,7 +66,7 @@ object APIGuidelinesRoot: GitVcsRoot ({
6566
url = "https://github.com/Kotlin/api-guidelines.git"
6667
branch = "refs/heads/main"
6768
branchSpec = "+:refs/heads/*"
68-
checkoutPolicy = AgentCheckoutPolicy.AUTO
69+
checkoutPolicy = AgentCheckoutPolicy.NO_MIRRORS
6970
authMethod = uploadedKey {
7071
uploadedKey = "default teamcity key"
7172
}

0 commit comments

Comments
 (0)