Skip to content

Commit 91fb2f2

Browse files
author
Abduqodiri Qurbonzoda
committed
Upgrade infra version to 0.3.0-dev-64
1 parent 70fc683 commit 91fb2f2

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

.teamcity/settings.kts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,16 @@ project {
4646

4747
val deployVersion = deployVersion().apply {
4848
dependsOnSnapshot(buildAll, onFailure = FailureAction.IGNORE)
49+
dependsOnSnapshot(BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID) {
50+
reuseBuilds = ReuseBuilds.NO
51+
}
4952
}
5053
val deploys = platforms.map { deploy(it, deployVersion) }
5154
val deployPublish = deployPublish(deployVersion).apply {
5255
dependsOnSnapshot(buildAll, onFailure = FailureAction.IGNORE)
56+
dependsOnSnapshot(BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID) {
57+
reuseBuilds = ReuseBuilds.NO
58+
}
5359
deploys.forEach {
5460
dependsOnSnapshot(it)
5561
}
@@ -139,6 +145,8 @@ fun Project.deployVersion() = BuildType {
139145
param("bintray-user", bintrayUserName)
140146
password("bintray-key", bintrayToken)
141147
param(versionSuffixParameter, "dev-%build.counter%")
148+
param("reverse.dep.$BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID.system.libs.repo.description", libraryStagingRepoDescription)
149+
param("env.libs.repository.id", "%dep.$BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID.env.libs.repository.id%")
142150
}
143151

144152
requirements {
@@ -149,7 +157,7 @@ fun Project.deployVersion() = BuildType {
149157
steps {
150158
gradle {
151159
name = "Verify Gradle Configuration"
152-
tasks = "clean publishBintrayCreateVersion"
160+
tasks = "clean publishPrepareVersion"
153161
gradleParams = "--info --stacktrace -P$versionSuffixParameter=%$versionSuffixParameter% -P$releaseVersionParameter=%$releaseVersionParameter% -PbintrayApiKey=%bintray-key% -PbintrayUser=%bintray-user%"
154162
buildFile = ""
155163
jdkHome = "%env.$jdk%"
@@ -167,6 +175,7 @@ fun Project.deployPublish(configureBuild: BuildType) = BuildType {
167175
// Tell configuration build how to get release version parameter from this build
168176
// "dev" is the default and means publishing is not releasing to public
169177
text(configureBuild.reverseDepParamRefs[releaseVersionParameter].name, "dev", display = ParameterDisplay.PROMPT, label = "Release Version")
178+
param("env.libs.repository.id", "%dep.$BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID.env.libs.repository.id%")
170179
}
171180
commonConfigure()
172181
}.also { buildType(it) }
@@ -181,6 +190,7 @@ fun Project.deploy(platform: Platform, configureBuild: BuildType) = buildType("D
181190
param(releaseVersionParameter, "${configureBuild.depParamRefs[releaseVersionParameter]}")
182191
param("bintray-user", bintrayUserName)
183192
password("bintray-key", bintrayToken)
193+
param("env.libs.repository.id", "%dep.$BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID.env.libs.repository.id%")
184194
}
185195

186196
vcs {

.teamcity/utils.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ const val versionSuffixParameter = "versionSuffix"
99
const val teamcitySuffixParameter = "teamcitySuffix"
1010
const val releaseVersionParameter = "releaseVersion"
1111

12-
const val bintrayUserName = "orangy"
13-
const val bintrayToken = "credentialsJSON:9a48193c-d16d-46c7-8751-2fb434b09e07"
12+
const val bintrayUserName = "%env.BINTRAY_USER%"
13+
const val bintrayToken = "%env.BINTRAY_API_KEY%"
14+
const val libraryStagingRepoDescription = "kotlinx.benchmark"
1415

1516
val platforms = Platform.values()
1617
const val jdk = "JDK_18_x64"
@@ -37,6 +38,8 @@ const val BUILD_ALL_ID = "Build_All"
3738
const val DEPLOY_CONFIGURE_VERSION_ID = "Deploy_Configure"
3839
const val DEPLOY_PUBLISH_ID = "Deploy_Publish"
3940

41+
val BUILD_CREATE_STAGING_REPO_ABSOLUTE_ID = AbsoluteId("KotlinTools_CreateSonatypeStagingRepository")
42+
4043
class KnownBuilds(private val project: Project) {
4144
private fun buildWithId(id: String): BuildType {
4245
return project.buildTypes.single { it.id.toString().endsWith(id) }
@@ -103,12 +106,12 @@ fun BuildType.commonConfigure() {
103106
}
104107
}
105108

106-
fun BuildType.dependsOn(build: BuildType, configure: Dependency.() -> Unit) =
109+
fun BuildType.dependsOn(build: IdOwner, configure: Dependency.() -> Unit) =
107110
apply {
108111
dependencies.dependency(build, configure)
109112
}
110113

111-
fun BuildType.dependsOnSnapshot(build: BuildType, onFailure: FailureAction = FailureAction.FAIL_TO_START, configure: SnapshotDependency.() -> Unit = {}) = apply {
114+
fun BuildType.dependsOnSnapshot(build: IdOwner, onFailure: FailureAction = FailureAction.FAIL_TO_START, configure: SnapshotDependency.() -> Unit = {}) = apply {
112115
dependencies.dependency(build) {
113116
snapshot {
114117
configure()

build.gradle

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,14 @@ apply plugin: 'kotlinx.team.infra'
1616

1717
infra {
1818
teamcity {
19-
bintrayUser = "orangy"
20-
bintrayToken = "credentialsJSON:9a48193c-d16d-46c7-8751-2fb434b09e07"
19+
libraryStagingRepoDescription = project.name
2120
}
2221

2322
publishing {
2423
include(":kotlinx.benchmark.runtime")
2524

26-
bintray {
27-
organization = 'kotlin'
28-
repository = 'kotlinx'
29-
library = 'kotlinx.benchmark'
30-
31-
username = findProperty('bintrayUser')
32-
password = findProperty('bintrayApiKey')
33-
}
25+
libraryRepoUrl = "https://github.com/Kotlin/kotlinx-benchmark"
26+
sonatype {}
3427
}
3528
}
3629

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kotlin_version=1.4.30
77
jmhVersion=1.21
88
junit_version=4.12
99

10-
infra_version=0.2.0-dev-55
10+
infra_version=0.3.0-dev-64
1111

1212
node_version = 8.9.4
1313
npm_version = 5.7.1

plugin/build.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,14 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
2020
apply plugin: 'kotlinx.team.infra'
2121

2222
infra {
23+
teamcity {
24+
libraryStagingRepoDescription = project.name
25+
}
2326
publishing {
2427
include(":")
2528

26-
bintray {
27-
organization = 'kotlin'
28-
repository = 'kotlinx'
29-
library = 'kotlinx.benchmark'
30-
31-
username = findProperty('bintrayUser')
32-
password = findProperty('bintrayApiKey')
33-
}
29+
libraryRepoUrl = "https://github.com/Kotlin/kotlinx-benchmark"
30+
sonatype {}
3431
}
3532
}
3633

plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ vcs=https://github.com/kotlin/kotlinx-benchmark
1010
kotlin_version=1.4.30
1111
jmhVersion=1.21
1212
junit_version=4.12
13-
infra_version=0.2.0-dev-55
13+
infra_version=0.3.0-dev-64
1414

0 commit comments

Comments
 (0)