diff --git a/redhat/release/update-to-head.sh b/redhat/release/update-to-head.sh index 7ab506edd21..8529ed32ca3 100755 --- a/redhat/release/update-to-head.sh +++ b/redhat/release/update-to-head.sh @@ -53,11 +53,16 @@ robot_trigger_msg=":robot: triggering CI on branch '${redhat_ref}' after synchin # Reset release-next to upstream main or . git fetch upstream $upstream_ref if [[ "$upstream_ref" == "main" ]]; then - git checkout upstream/main -B ${redhat_ref} + git checkout upstream/main -B ${redhat_ref}-ci else - git checkout $upstream_ref -B ${redhat_ref} + git checkout $upstream_ref -B ${redhat_ref}-ci fi +# RHTAP writes its pipeline files to the root of ${redhat_ref} +# Fetch those from origin and merge them into the the ci branch +git fetch origin $redhat_ref +git merge origin/$redhat_ref --no-edit + # Update redhat's main and take all needed files from there. git fetch origin $midstream_ref git checkout origin/$midstream_ref $custom_files @@ -67,15 +72,9 @@ if [[ -d redhat/patches ]]; then git apply redhat/patches/* fi -# RHTAP writes its pipeline files to the root of ${redhat_ref} -# Fetch those from origin and apply them to the the release branch -# since we just wiped out our local copy with the upstream ref. -git fetch origin $redhat_ref -git checkout origin/$redhat_ref .tekton - # Move overlays to root if [[ -d redhat/overlays ]]; then - git mv redhat/overlays/* . + mv redhat/overlays/* . fi git add . # Adds applied patches @@ -83,8 +82,6 @@ git add $custom_files # Adds custom files git commit -m "${redhat_files_msg}" # Trigger CI -# TODO: Set up openshift or github CI to run on release-next-ci -git checkout "${redhat_ref}" -B "${redhat_ref}"-ci date > ci git add ci git commit -m "${robot_trigger_msg}"