@@ -114,11 +114,7 @@ private static bool TryWriteStandalone( BuildContext context, CommonCommandSetti
114114
115115 var teamCityBuildSteps = new List < TeamCityBuildStep > ( ) ;
116116
117- if ( product . UseDocker )
118- {
119- teamCityBuildSteps . Add ( new TeamCityEngineeringPrepareImageBuildStep ( "PrepareImage" , "Prepare the Docker image" , product . DockerSpec ! ) ) ;
120- }
121- else
117+ if ( ! product . UseDocker )
122118 {
123119 teamCityBuildSteps . Add ( new TeamCityEngineeringCommandBuildStep ( "PreKill" , "Kill background processes before cleanup" , "tools kill" ) ) ;
124120 }
@@ -141,7 +137,8 @@ private static bool TryWriteStandalone( BuildContext context, CommonCommandSetti
141137 "UpstreamCheck" ,
142138 "Check pending upstream changes" ,
143139 "tools git check-upstream" ,
144- areCustomArgumentsAllowed : true ) ) ;
140+ areCustomArgumentsAllowed : true ,
141+ dockerSpec : product . DockerSpec ) ) ;
145142 }
146143
147144 teamCityBuildSteps . Add ( new TeamCityEngineeringBuildBuildStep ( configuration , true , product . DockerSpec ) ) ;
@@ -190,7 +187,8 @@ TeamCityBuildStep CreatePublishBuildStep( bool isStandalone = false )
190187 "Publish" ,
191188 "publish" ,
192189 $ "--configuration { configuration } { ( isStandalone ? " --standalone" : "" ) } ",
193- true ) ;
190+ true ,
191+ product . DockerSpec ) ;
194192
195193 if ( configurationInfo . ExportsToTeamCityDeploy )
196194 {
@@ -268,7 +266,7 @@ TeamCityBuildStep CreatePublishBuildStep( bool isStandalone = false )
268266 {
269267 BuildSteps =
270268 [
271- new TeamCityEngineeringCommandBuildStep ( "Swap" , "Swap" , "swap" , $ "--configuration { configuration } ", true )
269+ new TeamCityEngineeringCommandBuildStep ( "Swap" , "Swap" , "swap" , $ "--configuration { configuration } ", true , product . DockerSpec )
272270 ] ,
273271 IsDeployment = true ,
274272 SnapshotDependencies = swapDependencies . OrderBy ( d => d . ObjectId ) . ToArray ( ) ,
@@ -294,7 +292,9 @@ TeamCityBuildStep CreatePublishBuildStep( bool isStandalone = false )
294292 buildAgentRequirements : product . ResolvedBuildAgentRequirements )
295293 {
296294 BuildSteps =
297- [ new TeamCityEngineeringCommandBuildStep ( "Bump" , "Bump" , "bump" , areCustomArgumentsAllowed : true ) ] ,
295+ [
296+ new TeamCityEngineeringCommandBuildStep ( "Bump" , "Bump" , "bump" , areCustomArgumentsAllowed : true , dockerSpec : product . DockerSpec )
297+ ] ,
298298 BuildTimeOutThreshold = product . VersionBumpTimeOutThreshold ,
299299 IsSshAgentRequired = isRepoRemoteSsh
300300 } ) ;
@@ -323,7 +323,8 @@ [new TeamCityEngineeringCommandBuildStep( "Bump", "Bump", "bump", areCustomArgum
323323 "DownstreamMerge" ,
324324 "Merge downstream" ,
325325 "tools git merge-downstream" ,
326- areCustomArgumentsAllowed : true )
326+ areCustomArgumentsAllowed : true ,
327+ dockerSpec : product . DockerSpec )
327328 ] ,
328329 SnapshotDependencies = snapshotDependencies ,
329330 BuildTriggers = [ new SourceBuildTrigger ( ) ] ,
@@ -551,11 +552,11 @@ bool TryPopulateBuildConfigurations(
551552 defaultBranchParameter ,
552553 vcsRootId ) { SnapshotDependencies = dependencies . ToArray ( ) , BuildTriggers = consolidatedBuildTriggers } ;
553554
554- ContainerImageSpec ? dockerSpec = null ;
555+ DockerSpec ? dockerSpec = null ;
555556
556557 if ( product . UseDocker )
557558 {
558- dockerSpec = new ContainerImageSpec ( $ "{ product . ProductNameWithoutDot } -{ product . ProductFamily . Version } " ) ;
559+ dockerSpec = new DockerSpec ( $ "{ product . ProductNameWithoutDot } -{ product . ProductFamily . Version } " ) ;
559560 }
560561
561562 var nuGetBuildSteps =
@@ -722,7 +723,8 @@ TeamCitySourceDependency CreateSourceDependencyFromDefinition( DependencyDefinit
722723 $ "Bump{ bumpedProjectId . Split ( '_' ) . Last ( ) } ",
723724 $ "Bump version of { bumpedProjectName } ",
724725 "bump" ,
725- areCustomArgumentsAllowed : true ) { WorkingDirectory = $ "source-dependencies/{ bumpedProjectName } " } ) ;
726+ areCustomArgumentsAllowed : true ,
727+ dockerSpec : product . DockerSpec ) { WorkingDirectory = $ "source-dependencies/{ bumpedProjectName } " } ) ;
726728
727729 consolidatedVersionBumpSourceDependencies . Add ( CreateSourceDependencyFromDefinition ( dependencyDefinition ) ) ;
728730
@@ -824,7 +826,8 @@ bool TryAddPreOrPostDeploymentBuildConfiguration(
824826 $ "{ commandName } deployment of { project . Name } ",
825827 command ,
826828 "--configuration Public --buildNumber %build.number% --buildType %system.teamcity.buildType.id% --use-local-dependencies" ,
827- areCustomArgumentsAllowed : true ) { WorkingDirectory = $ "source-dependencies/{ project . Name } " } ) ;
829+ areCustomArgumentsAllowed : true ,
830+ dockerSpec : product . DockerSpec ) { WorkingDirectory = $ "source-dependencies/{ project . Name } " } ) ;
828831
829832 // Dependencies outside of the product family are fetched from the artifacts.
830833 if ( buildConfigurationsById . TryGetValue ( $ "{ project . Id } _{ publicBuildObjectName } ", out var publicBuildConfiguration ) )
@@ -869,10 +872,8 @@ bool TryAddPreOrPostDeploymentBuildConfiguration(
869872 $ "{ objectName } _{ consolidatedProjectId . Id } ",
870873 $ "{ commandName } consolidated deployment",
871874 command ,
872- "--configuration Public --buildNumber %build.number% --buildType %system.teamcity.buildType.id% --use-local-dependencies" )
873- {
874- WorkingDirectory = $ "source-dependencies/{ consolidatedProjectName } "
875- } ) ;
875+ "--configuration Public --buildNumber %build.number% --buildType %system.teamcity.buildType.id% --use-local-dependencies" ,
876+ dockerSpec : product . DockerSpec ) { WorkingDirectory = $ "source-dependencies/{ consolidatedProjectName } " } ) ;
876877
877878 var branch = getBranch ( product . DependencyDefinition ) ;
878879
@@ -922,7 +923,7 @@ bool TryAddPreOrPostDeploymentBuildConfiguration(
922923 var publicNuGetBuildCiId = $ "{ consolidatedProjectIdPrefix } { MarkNuGetObjectId ( publicBuildObjectName ) } ";
923924 var publicNuGetDeploymentCiId = $ "{ consolidatedProjectIdPrefix } { MarkNuGetObjectId ( publicDeploymentObjectName ) } ";
924925
925- var nuGetPublicDeploymentSteps = new TeamCityBuildStep [ ] { new TeamCityEngineeringPublishBuildStep ( publicConfiguration ) } ;
926+ var nuGetPublicDeploymentSteps = new TeamCityBuildStep [ ] { new TeamCityEngineeringPublishBuildStep ( publicConfiguration , product . DockerSpec ) } ;
926927
927928 // TODO: Only Public builds of dependencies that define version need to be included.
928929 // Here we include all Public builds which will cause download of all artifacts.
0 commit comments