Skip to content

Commit

Permalink
Specify RAM requirement for custom publish task
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Dec 4, 2024
1 parent 00db6a9 commit da76752
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .teamcity/src/subprojects/Agents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ fun Requirements.agent(
}

fun Requirements.agent(
os: String,
os: String?,
osArch: String? = null,
hardwareCapacity: String = MEDIUM,
) {
equals("teamcity.agent.jvm.os.family", os)
if (os != null) equals("teamcity.agent.jvm.os.family", os)
if (osArch != null) equals("teamcity.agent.jvm.os.arch", osArch)

// It is better to use memory constraint to select agent as it unlocks the possibility to use more powerful agents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ object PublishCustomTaskToMaven : BuildType({
createSonatypeRepository("%repo_name%")
publish("%tasks%", "%gpg_args%", os = "Auto", parallel = false)
}
requirements {
agent(os = null, hardwareCapacity = Agents.MEDIUM)
}
})

object PublishJvmToMaven : BuildType({
Expand Down

0 comments on commit da76752

Please sign in to comment.