Skip to content

Commit

Permalink
Merge pull request #276 from gradle/wolfs/use-ubuntu-ami
Browse files Browse the repository at this point in the history
Use Ubuntu 16 images for building native platform
  • Loading branch information
wolfs authored Apr 14, 2021
2 parents 1471b66 + b6f41f4 commit 8a0dc39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .teamcity/Agent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

enum class Agent(val os: Os, val architecture: Architecture) {
UbuntuAmd64(os = Os.Ubuntu, architecture = Architecture.Amd64),
UbuntuAarch64(os = Os.Ubuntu, architecture = Architecture.Aarch64),
UbuntuAmd64(os = Os.Ubuntu16, architecture = Architecture.Amd64),
UbuntuAarch64(os = Os.Ubuntu16, architecture = Architecture.Aarch64),
AmazonLinuxAmd64(os = Os.AmazonLinux, architecture = Architecture.Amd64),
AmazonLinuxAarch64(os = Os.AmazonLinux, architecture = Architecture.Aarch64),
CentOsAmd64(os = Os.CentOs, architecture = Architecture.Amd64),
Expand Down
4 changes: 3 additions & 1 deletion .teamcity/Os.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ interface Os {
fun addAgentRequirements(requirements: Requirements)
val osType: String

object Ubuntu : Linux(Ncurses.Ncurses5) {
object Ubuntu16 : Linux(Ncurses.Ncurses5) {
override fun Requirements.additionalRequirements() {
contains(osDistributionNameParameter, "ubuntu")
contains(osDistributionVersionParameter, "16")
}
}

Expand All @@ -30,6 +31,7 @@ interface Os {
}

private const val osDistributionNameParameter = "system.agent.os.distribution.name"
private const val osDistributionVersionParameter = "system.agent.os.distribution.version"

abstract class OsWithNameRequirement(private val osName: String, override val osType: String) : Os {
override fun addAgentRequirements(requirements: Requirements) {
Expand Down

0 comments on commit 8a0dc39

Please sign in to comment.