@@ -195,45 +195,6 @@ def __init__(
195195 targets = [targets .CodePipeline (pipeline = base_pipeline )],
196196 )
197197
198- # Pipeline is run everytime we push to main branch. Avoid unnecessary hold up if these updates are non-CI related
199- if not IS_DEV :
200- start_index = next (
201- (i for i , stage in enumerate (base_pipeline .stages ) if stage .stage_name == "PromoteToProduction" ),
202- None
203- )
204-
205- override_condition = {
206- "Conditions" : [
207- {
208- "Result" : "SKIP" ,
209- "Rules" : [
210- {
211- "Name" : "Skip_Prod_Deployment" ,
212- "RuleTypeId" : {
213- "Category" : "Rule" ,
214- "Owner" : "AWS" ,
215- "Provider" : "VariableCheck" ,
216- "Version" : "1"
217- },
218- "Configuration" : {
219- "Variable" :
"#{[email protected] _REBUILD}" ,
220- "Value" : "0" ,
221- "Operator" : "NE"
222- },
223- }
224- ]
225- }
226- ]
227- }
228-
229- l1_pipeline = base_pipeline .node .default_child
230-
231- for i in range (start_index , int (base_pipeline .stage_count )):
232- l1_pipeline .add_override (
233- f"Properties.Stages.{ i } .BeforeEntry" ,
234- override_condition
235- )
236-
237198 def deploy_to_environment (
238199 self ,
239200 deploy_environment_type : DeployEnvironmentType ,
@@ -305,58 +266,6 @@ def deploy_to_environment(
305266 deploy_environment = deploy_environment )
306267 pipeline .add_stage (gh_actions_stage )
307268
308- docker_build_wave = pipeline .add_wave (
309- f"{ deploy_environment_type .value } -DockerImageBuild"
310- )
311-
312- linux_stage = LinuxDockerImageBuildStage (
313- self ,
314- f"{ deploy_environment_type .value } -LinuxDockerImageBuild" ,
315- pipeline_environment = pipeline_environment ,
316- deploy_environment = deploy_environment ,
317- )
318-
319- linux_stage .add_stage_to_wave (
320- wave = docker_build_wave ,
321- input = source .primary_output ,
322- role = cross_account_role ,
323- additional_stacks = setup_stage .stacks ,
324- max_retry = MAX_TEST_RETRY ,
325- env = codebuild_environment_variables ,
326- )
327-
328- windows_stage = WindowsDockerImageBuildStage (
329- self ,
330- f"{ deploy_environment_type .value } -WindowsDockerImageBuild" ,
331- pipeline_environment = pipeline_environment ,
332- deploy_environment = deploy_environment ,
333- )
334-
335- windows_stage .add_stage_to_wave (
336- wave = docker_build_wave ,
337- input = source .primary_output ,
338- role = cross_account_role ,
339- additional_stacks = setup_stage .stacks ,
340- max_retry = MAX_TEST_RETRY ,
341- env = codebuild_environment_variables ,
342- )
343-
344- docker_build_wave .add_post (
345- CodeBuildStep (
346- f"{ deploy_environment_type .value } -FinalizeImages" ,
347- input = source ,
348- commands = [
349- "cd tests/ci/cdk/pipeline/scripts" ,
350- './finalize_images.sh --repos "${ECR_REPOS}"' ,
351- ],
352- env = {
353- ** codebuild_environment_variables ,
354- "ECR_REPOS" : f"{ ' ' .join (linux_stage .ecr_repo_names )} { ' ' .join (windows_stage .ecr_repo_names )} " ,
355- },
356- role = cross_account_role ,
357- )
358- )
359-
360269 ci_stage = CiStage (
361270 self ,
362271 f"{ deploy_environment_type .value } -CiTests" ,
@@ -371,6 +280,5 @@ def deploy_to_environment(
371280 max_retry = MAX_TEST_RETRY ,
372281 env = {
373282 ** codebuild_environment_variables ,
374- "PREVIOUS_REBUILDS" : f"{ linux_stage .need_rebuild } { linux_stage .need_rebuild } " ,
375283 },
376284 )
0 commit comments