6060 BRANCH_VARIABLE : ' BRANCH'
6161 # 'The name of the OpenStack K8s tag variable in the Makefile (for install_yamls).'
6262 OPENSTACK_K8S_TAG_VARIABLE : ' OPENSTACK_K8S_TAG'
63- # 'The branch that must exist in a repo for it to be processed .'
64- TRIGGER_BRANCH : ' olive '
63+ # 'The relative path to the file containing the list of repositories to process .'
64+ REPO_LIST_FILE : ' feature_branch_repos.txt '
6565 # 'The branch to create the new branch from.'
6666 SOURCE_BRANCH : ' main'
6767 # 'Timeout for git operations (in seconds)'
@@ -304,21 +304,27 @@ jobs:
304304 echo "Feature Branch Name : ${BRANCH_NAME}"
305305 echo "New Version on main : ${NEW_VERSION}"
306306 echo "New FORCE_BUMP_BRANCHES : ${FORCE_BUMP_BRANCHES}"
307- echo "Trigger Branch : ${TRIGGER_BRANCH }"
307+ echo "Repository List File : ${REPO_LIST_FILE }"
308308 echo "Source Branch : ${SOURCE_BRANCH}"
309309 echo "-------------------------------------------"
310310
311- echo "Searching for repositories in organization '${ORG_NAME}'..."
312- # Get active (non-archived) repositories
313- repos=$(gh repo list $ORG_NAME --limit 1000 --json name,isArchived --jq '.[] | select(.isArchived == false) | .name')
311+ echo "Reading repository list from '${REPO_LIST_FILE}'..."
312+ # Check if the repository list file exists
313+ if [ ! -f "${REPO_LIST_FILE}" ]; then
314+ echo "Error : Repository list file '${REPO_LIST_FILE}' not found."
315+ exit 1
316+ fi
317+
318+ # Read repositories from file, filtering out empty lines and comments
319+ repos=$(grep -v '^#' "${REPO_LIST_FILE}" | grep -v '^[[:space:]]*$' | tr '\n' ' ')
314320
315321 if [ -z "$repos" ]; then
316- echo "No active repositories found in the organization or permissions are missing ."
322+ echo "No repositories found in '${REPO_LIST_FILE}' ."
317323 exit 1
318324 fi
319-
325+
320326 total_repos=$(echo "$repos" | wc -w)
321- echo "Found ${total_repos} active repositories to process."
327+ echo "Found ${total_repos} repositories to process from file ."
322328
323329 created_repos=""
324330 failed_repos=""
@@ -333,23 +339,13 @@ jobs:
333339 for repo_name in $repos; do
334340 echo "--- Processing REPOSITORY : ${repo_name} (${current_repo}/${total_repos}) ---"
335341
336- if [[ "$repo_name" == "rabbitmq-cluster-operator" ]]; then
342+ if [[ "$repo_name" == "rabbitmq-cluster-operator" ]]; then
337343 echo "ℹ️ Skipping ${repo_name} (handled separately)"
338344 echo "${repo_name}" >> /tmp/skipped_repos.txt
339345 ((current_repo++))
340346 continue
341347 fi
342348
343- # Check if trigger branch exists - FAIL if API call fails
344- if ! gh api "repos/${ORG_NAME}/${repo_name}/branches/${TRIGGER_BRANCH}" >/dev/null 2>&1; then
345- echo "❌ Trigger branch '${TRIGGER_BRANCH}' not found in ${repo_name}. Skipping."
346- echo "${repo_name}" >> /tmp/skipped_repos.txt
347- ((current_repo++))
348- continue
349- fi
350-
351- echo "✅ Trigger branch '${TRIGGER_BRANCH}' found in ${repo_name}."
352-
353349 TEMP_DIR=$(mktemp -d)
354350 echo "Cloning repository into ${TEMP_DIR}..."
355351
@@ -475,9 +471,9 @@ jobs:
475471 total_checked=$(echo "$repos" | wc -w)
476472
477473 echo "📊 Processing Summary:"
478- echo " • Total repositories checked : ${total_checked}"
474+ echo " • Total repositories from list : ${total_checked}"
479475 echo " • Successfully processed : ${successful_count}"
480- echo " • Skipped (no trigger branch or already exists ) : ${skipped_count}"
476+ echo " • Skipped (already exists or handled separately ) : ${skipped_count}"
481477
482478 if [ "$DRY_RUN" = "true" ]; then
483479 echo ""
@@ -708,11 +704,10 @@ jobs:
708704 exit 1
709705 fi
710706
711- update_yaml_value ".github/workflows/release-branch-sync.yaml" ".on.workflow_call.inputs.source_branch.default" "${BRANCH_NAME}"
712707 update_yaml_value ".github/workflows/force-bump-branches.yaml" ".jobs.trigger-jobs.strategy.matrix.branch" "${FORCE_BUMP_BRANCHES}"
713708
714709 # Commit and push changes if any were made
715- commit_and_push "ci: Update workflow defaults for ${BRANCH_NAME}" ".github/workflows/" "${SOURCE_BRANCH}"
710+ commit_and_push "ci: Update force-bump-branches for ${BRANCH_NAME}" ".github/workflows/force-bump-branches.yaml " "${SOURCE_BRANCH}"
716711
717712 cd .. && rm -rf "$TEMP_DIR"
718713 echo "Workflow finished."
0 commit comments