-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
5,334 additions
and
3,128 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 12 additions & 18 deletions
30
.teamcity/builds/apiReferences/kotlinx/coroutines/KotlinxCoroutinesBuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
package builds.apiReferences.kotlinx.coroutines | ||
|
||
import BuildParams.KOTLINX_COROUTINES_RELEASE_TAG | ||
import builds.apiReferences.dependsOnDokkaTemplate | ||
import builds.apiReferences.templates.BuildApiReference | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import jetbrains.buildServer.configs.kotlin.triggers.vcs | ||
|
||
object KotlinxCoroutinesBuildApiReference: BuildType({ | ||
name = "kotlinx.coroutines API reference" | ||
object KotlinxCoroutinesBuildApiReference : BuildType({ | ||
name = "kotlinx.coroutines API reference" | ||
|
||
templates(BuildApiReference) | ||
templates(BuildApiReference) | ||
|
||
params { | ||
param("release.tag", BuildParams.KOTLINX_COROUTINES_RELEASE_TAG) | ||
} | ||
|
||
vcs { | ||
root(builds.apiReferences.vcsRoots.KotlinxCoroutines) | ||
} | ||
params { | ||
param("release.tag", KOTLINX_COROUTINES_RELEASE_TAG) | ||
} | ||
|
||
triggers { | ||
vcs { | ||
branchFilter = "+:<default>" | ||
root(builds.apiReferences.vcsRoots.KotlinxCoroutines) | ||
} | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxCoroutinesPrepareDokkaTemplates) | ||
} | ||
}) | ||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxCoroutinesPrepareDokkaTemplates) | ||
} | ||
}) |
60 changes: 23 additions & 37 deletions
60
.teamcity/builds/apiReferences/kotlinx/datetime/KotlinxDatetimeBuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,38 @@ | ||
package builds.apiReferences.kotlinx.datetime | ||
|
||
import BuildParams.KOTLINX_DATETIME_RELEASE_TAG | ||
import builds.apiReferences.dependsOnDokkaTemplate | ||
import builds.apiReferences.templates.BuildApiReference | ||
import builds.apiReferences.templates.scriptDokkaVersionSync | ||
import builds.apiReferences.templates.scriptDropSnapshot | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.gradle | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.script | ||
import jetbrains.buildServer.configs.kotlin.triggers.vcs | ||
|
||
object KotlinxDatetimeBuildApiReference : BuildType({ | ||
name = "kotlinx-datetime API reference" | ||
name = "kotlinx-datetime API reference" | ||
|
||
artifactRules = "core/build/dokka/html/** => pages.zip" | ||
templates(BuildApiReference) | ||
|
||
steps { | ||
script { | ||
name = "Drop SNAPSHOT word for deploy" | ||
scriptContent = """ | ||
#!/bin/bash | ||
sed -i -E "s/versionSuffix=SNAPSHOT//gi" ./gradle.properties | ||
""".trimIndent() | ||
dockerImage = "debian" | ||
} | ||
gradle { | ||
name = "Build dokka html" | ||
tasks = ":kotlinx-datetime:dokkaHtml" | ||
useGradleWrapper = true | ||
} | ||
} | ||
|
||
params { | ||
param("release.tag", BuildParams.KOTLINX_DATETIME_RELEASE_TAG) | ||
param("teamcity.vcsTrigger.runBuildInNewEmptyBranch", "true") | ||
} | ||
artifactRules = "core/build/dokka/html/** => pages.zip" | ||
|
||
vcs { | ||
root(builds.apiReferences.vcsRoots.KotlinxDatetime) | ||
} | ||
params { | ||
param("release.tag", KOTLINX_DATETIME_RELEASE_TAG) | ||
param("DOKKA_TEMPLATE_TASK", ":kotlinx-datetime:dokkaHtml") | ||
} | ||
|
||
triggers { | ||
vcs { | ||
branchFilter = "+:<default>" | ||
root(builds.apiReferences.vcsRoots.KotlinxDatetime) | ||
} | ||
} | ||
|
||
requirements { | ||
doesNotContain("teamcity.agent.name", "windows") | ||
} | ||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxDatetimePrepareDokkaTemplates, "core/dokka-templates") | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxDatetimePrepareDokkaTemplates, "core/dokka-templates") | ||
} | ||
steps { | ||
scriptDropSnapshot { | ||
scriptContent = """ | ||
#!/bin/bash | ||
sed -i -E "s/versionSuffix=SNAPSHOT//gi" ./gradle.properties | ||
""".trimIndent() | ||
} | ||
} | ||
}) |
41 changes: 41 additions & 0 deletions
41
.teamcity/builds/apiReferences/kotlinx/metadataJvm/KotlinxMetadataJvmBuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package builds.apiReferences.kotlinx.metadataJvm | ||
|
||
import BuildParams.KOTLINX_METADATA_JVM_RELEASE_TAG | ||
import builds.apiReferences.dependsOnDokkaTemplate | ||
import builds.apiReferences.templates.BuildApiReference | ||
import builds.apiReferences.templates.scriptDropSnapshot | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import jetbrains.buildServer.configs.kotlin.triggers.vcs | ||
|
||
object KotlinxMetadataJvmBuildApiReference : BuildType({ | ||
name = "kotlinx-metadata-jvm API reference" | ||
|
||
templates(BuildApiReference) | ||
|
||
artifactRules = "libraries/kotlinx-metadata/jvm/build/dokka/** => pages.zip" | ||
|
||
params { | ||
param("release.tag", KOTLINX_METADATA_JVM_RELEASE_TAG) | ||
param("DOKKA_TEMPLATE_TASK", ":kotlinx-metadata-jvm:dokkaHtml -PkotlinxMetadataDeployVersion=${KOTLINX_METADATA_JVM_RELEASE_TAG}") | ||
} | ||
|
||
triggers { | ||
vcs { | ||
enabled = false | ||
} | ||
} | ||
|
||
vcs { | ||
root(builds.apiReferences.vcsRoots.Kotlin) | ||
} | ||
|
||
steps { | ||
scriptDropSnapshot { | ||
enabled = false | ||
} | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxMetadataJvmPrepareDokkaTemplates, "libraries/kotlinx-metadata/jvm/dokka-templates") | ||
} | ||
}) |
20 changes: 20 additions & 0 deletions
20
.teamcity/builds/apiReferences/kotlinx/metadataJvm/KotlinxMetadataJvmBuildSearchIndex.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package builds.apiReferences.kotlinx.metadataJvm | ||
|
||
import builds.apiReferences.dependsOnDokkaPagesJson | ||
import builds.apiReferences.templates.BuildApiReferenceSearchIndex | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
|
||
object KotlinxMetadataJvmBuildSearchIndex: BuildType({ | ||
name = "Build search index for kotlinx-metadata-jvm" | ||
|
||
templates(BuildApiReferenceSearchIndex) | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx-metadata-jvm") | ||
param("env.API_REFERENCE_URL", "/api/kotlinx-metadata-jvm") | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaPagesJson(KotlinxMetadataJvmBuildApiReference) | ||
} | ||
}) |
14 changes: 14 additions & 0 deletions
14
...mcity/builds/apiReferences/kotlinx/metadataJvm/KotlinxMetadataJvmPrepareDokkaTemplates.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package builds.apiReferences.kotlinx.metadataJvm | ||
|
||
import builds.apiReferences.templates.PrepareDokkaTemplate | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
|
||
object KotlinxMetadataJvmPrepareDokkaTemplates: BuildType({ | ||
name = "Prepare dokka templates for kotlinx-metadata-jvm" | ||
|
||
templates(PrepareDokkaTemplate) | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx-metadata-jvm") | ||
} | ||
}) |
26 changes: 10 additions & 16 deletions
26
...mcity/builds/apiReferences/kotlinx/serialization/KotlinxSerializationBuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
package builds.apiReferences.kotlinx.serialization | ||
|
||
import BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG | ||
import builds.apiReferences.dependsOnDokkaTemplate | ||
import builds.apiReferences.templates.BuildApiReference | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import jetbrains.buildServer.configs.kotlin.triggers.vcs | ||
|
||
object KotlinxSerializationBuildApiReference : BuildType({ | ||
name = "kotlinx.serialization API reference" | ||
name = "kotlinx.serialization API reference" | ||
|
||
templates(BuildApiReference) | ||
templates(BuildApiReference) | ||
|
||
params { | ||
param("release.tag", BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG) | ||
} | ||
|
||
vcs { | ||
root(builds.apiReferences.vcsRoots.KotlinxSerialization) | ||
} | ||
params { | ||
param("release.tag", KOTLINX_SERIALIZATION_RELEASE_TAG) | ||
} | ||
|
||
triggers { | ||
vcs { | ||
branchFilter = "+:<default>" | ||
root(builds.apiReferences.vcsRoots.KotlinxSerialization) | ||
} | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxSerializationPrepareDokkaTemplates) | ||
} | ||
dependencies { | ||
dependsOnDokkaTemplate(KotlinxSerializationPrepareDokkaTemplates) | ||
} | ||
}) |
79 changes: 55 additions & 24 deletions
79
.teamcity/builds/apiReferences/templates/BuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,68 @@ | ||
package builds.apiReferences.templates | ||
|
||
import BuildParams.DOKKA_TEMPLATES_VERSION | ||
import jetbrains.buildServer.configs.kotlin.BuildSteps | ||
import jetbrains.buildServer.configs.kotlin.Template | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.gradle | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.script | ||
import jetbrains.buildServer.configs.kotlin.triggers.vcs | ||
|
||
fun BuildSteps.scriptDropSnapshot(block: ScriptBuildStep.() -> Unit) = step( | ||
ScriptBuildStep { | ||
id = "step-drop-snapshot-id" | ||
name = "Drop SNAPSHOT word for deploy" | ||
dockerImage = "debian" | ||
scriptContent = """ | ||
#!/bin/bash | ||
CURRENT_VERSION="$(sed -E s/^v?//g <<<%release.tag%)" | ||
sed -i -E "s/^version=.+(-SNAPSHOT)?/version=${'$'}CURRENT_VERSION/gi" ./gradle.properties | ||
""".trimIndent() | ||
}.apply(block), | ||
) | ||
|
||
const val DOKKA_SPACE_REPO = "https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev/" | ||
|
||
fun BuildSteps.scriptDokkaVersionSync(block: ScriptBuildStep.() -> Unit) = step( | ||
ScriptBuildStep { | ||
id = "step-dokka-version-sync-id" | ||
name = "Sync dokka version with main repository templates" | ||
dockerImage = "debian" | ||
scriptContent = """ | ||
#!/bin/bash | ||
sed -i -E "s/^(dokka_version|dokkaVersion)=.+/\1=%DOKKA_TEMPLATES_VERSION%/gi" ./gradle.properties | ||
find . -name "*.gradle.kts" -exec sed -i -E "s|mavenCentral|maven(url = \"$DOKKA_SPACE_REPO\")\nmavenCentral|" {} \; | ||
find . -name "*.gradle" -exec sed -i -E "s|mavenCentral|maven \{ url \"$DOKKA_SPACE_REPO\" \}\nmavenCentral|" {} \; | ||
""".trimIndent() | ||
}.apply(block), | ||
) | ||
|
||
object BuildApiReference : Template({ | ||
name = "Dokka Reference Template" | ||
|
||
artifactRules = "build/dokka/htmlMultiModule/** => pages.zip" | ||
|
||
steps { | ||
script { | ||
name = "Drop SNAPSHOT word for deploy" | ||
scriptContent = """ | ||
#!/bin/bash | ||
CURRENT_VERSION="$(sed -E s/^v?//g <<<%release.tag%)" | ||
sed -i -E "s/^version=.+(-SNAPSHOT)?/version=${'$'}CURRENT_VERSION/gi" ./gradle.properties | ||
""".trimIndent() | ||
dockerImage = "debian" | ||
name = "Dokka Reference Template" | ||
|
||
artifactRules = "build/dokka/htmlMultiModule/** => pages.zip" | ||
|
||
params { | ||
param("teamcity.vcsTrigger.runBuildInNewEmptyBranch", "true") | ||
param("DOKKA_TEMPLATES_VERSION", DOKKA_TEMPLATES_VERSION) | ||
param("DOKKA_TEMPLATE_TASK", "dokkaHtmlMultiModule") | ||
} | ||
|
||
gradle { | ||
name = "Build dokka html" | ||
tasks = "dokkaHtmlMultiModule" | ||
triggers { | ||
vcs { | ||
branchFilter = "+:<default>" | ||
} | ||
} | ||
} | ||
|
||
requirements { | ||
contains("docker.server.osType", "linux") | ||
} | ||
requirements { | ||
contains("docker.server.osType", "linux") | ||
} | ||
|
||
params { | ||
param("teamcity.vcsTrigger.runBuildInNewEmptyBranch", "true") | ||
} | ||
steps { | ||
scriptDropSnapshot {} | ||
scriptDokkaVersionSync {} | ||
gradle { | ||
name = "Build dokka html" | ||
tasks = "%DOKKA_TEMPLATE_TASK%" | ||
} | ||
} | ||
}) |
Oops, something went wrong.