Skip to content

Commit 1dc665c

Browse files
Quattro8zoobestik
authored andcommitted
KTL-2775 Replace docker build step for the KMP documentation (use environment variables)
1 parent 4f6b991 commit 1dc665c

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

.teamcity/documentation/builds/KotlinMultiplatform.kt

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import jetbrains.buildServer.configs.kotlin.BuildType
55
import jetbrains.buildServer.configs.kotlin.buildSteps.script
66

77
object KotlinMultiplatform: BuildType ({
8+
val dockerImageTag = "2.1.2176-p8483"
9+
810
name = "Kotlin Multiplatform"
911
description = "KTL-2775 Migrate KMP Dev Docs: Create a Build of KMP Dev Docs in Our Pipeline"
1012

@@ -17,20 +19,32 @@ object KotlinMultiplatform: BuildType ({
1719
""".trimIndent()
1820

1921
steps {
22+
// script {
23+
// name = "Build documentation"
24+
// scriptContent = """
25+
// #!/bin/bash
26+
// set -e -x -u
27+
//
28+
// docker run --rm -v %teamcity.build.checkoutDir%:/opt/sources \
29+
// registry.jetbrains.team/p/writerside/builder/writerside-builder:latest \
30+
// /bin/bash -c "export DISPLAY=:99 && Xvfb :99 & /opt/builder/bin/idea.sh helpbuilderinspect \
31+
// --source-dir /opt/sources \
32+
// --product kotlin-multiplatform-docs/mpd \
33+
// --runner teamcity \
34+
// --frontend-url https://kotlinlang.org/docs/static/v3/ \
35+
// --output-dir /opt/sources/artifacts"
36+
// """.trimIndent()
37+
// }
2038
script {
21-
name = "Build documentation"
22-
scriptContent = """
23-
#!/bin/bash
24-
set -e -x -u
25-
26-
docker run --rm -v %teamcity.build.checkoutDir%:/opt/sources \
27-
registry.jetbrains.team/p/writerside/builder/writerside-builder:latest \
28-
/bin/bash -c "export DISPLAY=:99 && Xvfb :99 & /opt/builder/bin/idea.sh helpbuilderinspect \
29-
--source-dir /opt/sources \
30-
--product kotlin-multiplatform-docs/mpd \
31-
--runner teamcity \
32-
--frontend-url https://kotlinlang.org/docs/static/v3/ \
33-
--output-dir /opt/sources/artifacts"
39+
name = "Build KMP Documentation with the docker"
40+
dockerImage = "registry.jetbrains.team/p/writerside/builder/writerside-builder:$dockerImageTag"
41+
dockerRunParameters = """
42+
--rm -v %teamcity.build.checkoutDir%:/opt/sources \
43+
-e SOURCE_DIR=/opt/sources \
44+
-e PRODUCT=kotlin-multiplatform-docs/mpd \
45+
-e RUNNER=teamcity \
46+
-e FRONTEND=https://kotlinlang.org/docs/static/v3/ \
47+
-e OUTPUT_DIR=/opt/sources/artifacts
3448
""".trimIndent()
3549
}
3650
}

0 commit comments

Comments
 (0)