Skip to content

Conversation

HannesWell
Copy link
Member

@HannesWell HannesWell commented Sep 8, 2025

This prevents maintenance branches from fetching the latest changes on the master branches of all submodules and therefore failing all builds early (because the sub-module expect a newer parent-pom version).

The multi-branch pipeline of this repo must then be configured to not have Update tracking submodules to tip of branch enabled.

grafik

Follow-up on:

This prevents maintenance branches from fetching the latest changes on
the master branches of all submodules and therefore failing all builds
early (because the submodule expect a newer parent-pom version).

Follow-up on:
- eclipse-platform#3000
@HannesWell
Copy link
Member Author

Another alternative might be to update the .gitmodules file on the maintenance branch and set that maintenance branch as submodule-branch, instead of master, similar to how it's done with the
cje-production/streams/repositories_master.txt (which is renamed) or cje-production/streams/repositories_java25.txt file, e.g. in

The repositories_master.txt wouldn't then be necessary anymore and repositories_java25.txt could only contain the branches that are different from .gitmodules (which would also reduce the RelEng changes). This might also allow us to simplify

git submodule foreach 'git fetch; SUBMODULE_BRANCH=$(grep $name: ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt | cut -f2 -d\ ); SUBMODULE_BRANCH=${SUBMODULE_BRANCH:-$BRANCH}; echo Checking out $SUBMODULE_BRANCH; git checkout $SUBMODULE_BRANCH; git pull'

and
git submodule foreach 'if grep "^${name}:" ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt > /dev/null; then git tag $BUILD_ID; PUSH_URL="$(toPushRepo $(git config --get remote.origin.url))"; git push --verbose $PUSH_URL $BUILD_ID; else echo Skipping $name; fi || :'

But as this is more work to implement, I would leave that for later.

@HannesWell
Copy link
Member Author

The multi-branch pipeline of this repo must then be configured to not have Update tracking submodules to tip of branch enabled.

I have already disabled that option in the configuration of this repos Jenkins multi-branch pipeline project and it seems to work as desired. A PR to the 4.37_maintenance branch can have a successful build:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant