@@ -62,45 +62,29 @@ def call_url_with_retry(url: str, max_retries: int = 5, delay: int = 1) -> reque
6262
6363 steps = []
6464 response = call_url_with_retry (RELEASES_URL )
65- < << << << HEAD
66- versions_json = response . json ( )
65+ yaml = YAML ( typ = 'safe' )
66+ versions_yaml : typing . final = yaml . load ( response . text )
6767
6868 # there are situations to manually run CIs with PR change,
6969 # set MANUAL_TARGET_BRANCH with upstream target branch and run
7070 manually_set_target_branch : typing .final = os .getenv ("MANUAL_TARGET_BRANCH" )
7171 target_branch : typing .final = manually_set_target_branch if manually_set_target_branch else os .getenv ("TARGET_BRANCH" )
7272 print (f"Running with target_branch: { target_branch } " )
7373 if target_branch == '8.x' :
74- full_stack_version : typing .final = versions_json ["snapshots" ]["8.future" ]
74+ full_stack_version : typing .final = versions_yaml ["snapshots" ]["8.future" ]
7575 steps += generate_unit_and_integration_test_steps (full_stack_version , "true" )
7676 elif target_branch == 'main' :
77- full_stack_version : typing .final = versions_json ["snapshots" ][target_branch ]
77+ full_stack_version : typing .final = versions_yaml ["snapshots" ][target_branch ]
7878 steps += generate_unit_and_integration_test_steps (full_stack_version , "true" )
7979 else :
8080 # generate steps for the version if released
81- releases = versions_json ["releases" ]
81+ releases = versions_yaml ["releases" ]
8282 for release_version in releases :
8383 if releases [release_version ].startswith (target_branch ):
8484 steps += generate_unit_and_integration_test_steps (releases [release_version ], "false" )
8585 break
86- == == == =
87- yaml = YAML (typ = 'safe' )
88- versions_yaml : typing .final = yaml .load (response .text )
89-
90- # Use BUILDKITE_SOURCE to figure out PR merge or schedule.
91- # If PR merge, no need to run builds on all branches, target branch will be good
92- # - webhook when PR gets merged
93- # - schedule when daily schedule starts
94- # - ui when manually kicking job from BK UI
95- # - manual kick off will be on PR or entire main branch, can be decided with BUILDKITE_BRANCH
96- bk_source = os .getenv ("BUILDKITE_SOURCE" )
97- bk_branch = os .getenv ("BUILDKITE_BRANCH" )
98- steps = generate_steps_for_scheduler (versions_yaml ) if (bk_source == "schedule" or bk_branch == "main" ) \
99- else generate_steps_for_main_branch (versions_yaml )
100- >> >> >> > febb207 (Update buildkite script to look for new logstash releases location (#358))
101-
10286 # steps for snapshot version
103- snapshots = versions_json ["snapshots" ]
87+ snapshots = versions_yaml ["snapshots" ]
10488 for snapshot_version in snapshots :
10589 if snapshots [snapshot_version ].startswith (target_branch ):
10690 steps += generate_unit_and_integration_test_steps (snapshots [snapshot_version ], "false" )
0 commit comments