Skip to content

Commit

Permalink
fix(ci); add sitemap for sub api
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed Nov 20, 2024
1 parent e3140ea commit 53b0fa3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package builds.apiReferences.kotlinx.coroutines
import BuildParams.KOTLINX_COROUTINES_ID
import BuildParams.KOTLINX_COROUTINES_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.stdlib.sitemapGenerate
import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType

Expand All @@ -23,4 +24,8 @@ object KotlinxCoroutinesBuildApiReference : BuildType({
dependencies {
dependsOnDokkaTemplate(KotlinxCoroutinesPrepareDokkaTemplates)
}

steps {
sitemapGenerate(KOTLINX_COROUTINES_ID)
}
})
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package builds.apiReferences.kotlinx.datetime

import BuildParams.KOTLINX_COROUTINES_ID
import BuildParams.KOTLINX_DATETIME_ID
import BuildParams.KOTLINX_DATETIME_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.stdlib.sitemapGenerate
import builds.apiReferences.templates.BuildApiReference
import builds.apiReferences.templates.buildDokkaHTML
import builds.apiReferences.templates.scriptDropSnapshot
Expand Down Expand Up @@ -39,5 +41,6 @@ object KotlinxDatetimeBuildApiReference : BuildType({
buildDokkaHTML {
tasks = ":kotlinx-datetime:dokkaHtml"
}
sitemapGenerate(KOTLINX_DATETIME_ID)
}
})
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package builds.apiReferences.kotlinx.io

import BuildParams.KOTLINX_DATETIME_ID
import BuildParams.KOTLINX_IO_ID
import BuildParams.KOTLINX_IO_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.stdlib.sitemapGenerate
import builds.apiReferences.templates.BuildApiReference
import builds.apiReferences.templates.buildDokkaHTML
import builds.apiReferences.templates.scriptDokkaVersionSync
Expand Down Expand Up @@ -48,5 +50,6 @@ object KotlinxIOBuildApiReference : BuildType({
./gradlew dokkaHtmlMultiModule --no-daemon --no-configuration-cache
""".trimIndent()
}
sitemapGenerate(KOTLINX_IO_ID)
}
})
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package builds.apiReferences.kotlinx.metadataJvm

import BuildParams.KOTLINX_IO_ID
import BuildParams.KOTLINX_METADATA_ID
import BuildParams.KOTLIN_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.stdlib.sitemapGenerate
import builds.apiReferences.templates.*
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.script
Expand Down Expand Up @@ -48,6 +50,7 @@ object KotlinxMetadataJvmBuildApiReference : BuildType({
./gradlew :kotlin-metadata-jvm:dokkaHtml -PdeployVersion=${KOTLIN_RELEASE_TAG.removePrefix("v")} --no-daemon --no-configuration-cache
""".trimIndent()
}
sitemapGenerate(KOTLINX_METADATA_ID)
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package builds.apiReferences.kotlinx.serialization

import BuildParams.KOTLINX_METADATA_ID
import BuildParams.KOTLINX_SERIALIZATION_ID
import BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.stdlib.sitemapGenerate
import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType

Expand All @@ -23,4 +25,8 @@ object KotlinxSerializationBuildApiReference : BuildType({
dependencies {
dependsOnDokkaTemplate(KotlinxSerializationPrepareDokkaTemplates)
}

steps {
sitemapGenerate(KOTLINX_SERIALIZATION_ID)
}
})
17 changes: 10 additions & 7 deletions .teamcity/builds/apiReferences/stdlib/BuildStdlibApiReference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ package builds.apiReferences.stdlib
import BuildParams.KOTLIN_CORE_API_BUILD_ID
import builds.scriptDistAnalyze
import jetbrains.buildServer.configs.kotlin.AbsoluteId
import jetbrains.buildServer.configs.kotlin.BuildSteps
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.script

fun BuildSteps.sitemapGenerate(lib: String) = scriptDistAnalyze {
//language=bash
scriptContent += "\n" + """
cd ../../dist
mv sitemap.xml api/$lib/sitemap.xml
""".trimIndent()
}

object BuildStdlibApiReference : BuildType({
name = "Core API pages"
description = "Build pages for Kotlin Core API"
Expand Down Expand Up @@ -45,13 +54,7 @@ object BuildStdlibApiReference : BuildType({
""".trimIndent()
dockerImage = "alpine"
}
scriptDistAnalyze {
//language=bash
scriptContent += "\n" + """
cd ../../dist
mv sitemap.xml api/core/sitemap.xml
""".trimIndent()
}
sitemapGenerate("core")
}

dependencies {
Expand Down

0 comments on commit 53b0fa3

Please sign in to comment.