Skip to content

Commit

Permalink
[TEAMCITY-QA-T] Fix redundant Linux OS type requirements (#83)
Browse files Browse the repository at this point in the history
* Remove redundant platform requirements.

* Update parameters related to Docker platform.
  • Loading branch information
AndreyKoltsov1997 authored Jun 28, 2023
1 parent 6894c40 commit ccc24ad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .teamcity/delivery/BuildAndPushHosted.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.dockerCommand
* TODO: Remove configuration, as it duplicates the build included into PushLocalLinux2004.kts, while seems redundant.
*/
object BuildAndPushHosted : BuildType({
name = "Build and push for teamcity.jetbrains.com"
name = "[Linux] [Staging] Build And Push 'teamcity-server' Docker image into staging registry"
buildNumberPattern = "%dockerImage.teamcity.buildNumber%-%build.counter%"
vcs { root(TeamCityDockerImagesRepo) }

Expand Down
4 changes: 4 additions & 0 deletions .teamcity/delivery/production/PushHubLinux.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ object push_hub_linux : BuildType({
description = "Moves TeamCity Linux-based staging images into production registry."
buildNumberPattern = "%dockerImage.teamcity.buildNumber%-%build.counter%"

params {
param("dockerImage.platform", "linux")
}

steps {
ImageInfoRepository.getAmdLinuxImages2004().forEach { imageInfo ->
moveToProduction(imageInfo)
Expand Down
5 changes: 5 additions & 0 deletions .teamcity/delivery/staging/PushLocalLinux2004.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ object push_local_linux_20_04 : BuildType({
root(TeamCityDockerImagesRepo)
}

params {
param("dockerImage.platform", "linux")
}

steps {
dockerCommand {
name = "Preflight check of base image - ubuntu:20.04"
Expand All @@ -40,6 +44,7 @@ object push_local_linux_20_04 : BuildType({
}

requirements {
contains("docker.server.osType", "linux")
// In order to correctly build AMD-based images, we wouldn't want it to be scheduled on ARM-based agent
doesNotContain("teamcity.agent.name", "arm")
}
Expand Down
1 change: 0 additions & 1 deletion .teamcity/utils/dsl/steps/DockerSteps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fun BuildSteps.buildImage(imageInfo: ImageInfo) {
commandArgs = "--no-cache"
namesAndTags = imageInfo.baseFqdn.trimIndent()
}
param("dockerImage.platform", "linux")
}

this.dockerCommand {
Expand Down

0 comments on commit ccc24ad

Please sign in to comment.