Fedora-Forgejo fork infrastructure and maintenance
Find a file
Lenka Segura 3ec0825bfc Update README
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2025-11-24 16:52:22 +01:00
options/label Update Scrum process label template 2025-10-20 17:04:20 +10:00
scripts Update scripts/update-forge-fas-emails.py 2025-11-07 01:50:48 +00:00
SOPs Add SOP for forgejo actions 2025-10-30 13:02:20 +01:00
DESIGNBRIEF.md Update DESIGNBRIEF.md 2025-08-13 16:45:26 +02:00
meeting.md Update meeting.md 2025-03-26 14:17:12 +00:00
README.md Update README 2025-11-24 16:52:22 +01:00

Fedora-Forgejo fork infrastructure and maintenance

Repository overview

Fedora-Forgejo fork is located at https://codeberg.org/fedora/forgejo.

Branch synchronization

The forgejo and v*/forgejo branches are automatically synchronized via the branch_sync workflow forgejo/.forgejo/workflows/branch_sync.yml on a daily basis.

The main branch is currently synchronized manually to maintain Fedora-specific commits at the top of the commit history.

main_sync workflow runs on a weekly basis generating pull requests for review.

For the moment, the main branch synchronization is done manually once a week (or when needed) by rebasing main on fedora/v{latest_version}/forgejo branch, cherry-picking Fedora-specific commits and force-pushing into fedora/forgejo main branch. Note that with this approach the git hashes of all our commits change.

How to rebase main branch to latest versioned with Fedora commits on top

git pull

Create a backup of main branch, we're playing with force push here!
git co -b main_backup

Make 'main' follow latest versioned branch
git branch -f main fedora/v12.0/forgejo git co main

Identify the Fedora commits
git log --oneline main_backup

Apply them on top of the rebased 'main'
git cherry-pick <commit> <commit> ...

Confirm everything looks fine, there is latest version commit and all Fedora commits on top
git log --oneline main

Push the backup to your fork, to keep safe
git push <my_fork_remote> main_backup

Force push main to fedora-forgejo repository
git push <upstream> main -f

When there's a new Forgejo release, before the rebase of main branch it is necessary to update the git tag in the image.

Build pipeline

Image Build Triggering

The trigger_konflux_build workflow is automatically executed on every push to:

  • staging
  • production branches

This workflow creates a "Commit bump" commit in the fedora/oci_image_definitions repository, which is mirrored to github.com/fedora-infra/forgejo-oci-images. This triggers the Konflux build pipeline for new image generation.

Konflux Pull Request Synchronization

The gh_pr_sync workflow runs at every fedora-konflux pull request opened at the github repo. The action open a pull request on the codeberg side for review and synchronize both repositories.

Development guidelines

Commit management

  1. Optimize commit history by squashing commits to the minimum necessary
  2. Follow the principle of one commit per feature/PR where possible
  3. Use rebase and fast-forward merging strategy to avoid unnecessary merge commits
  4. Make sure your commit passes the CI checks (at least to a level of the current last commit in the main branch). Bear in mind that CI runs on pull-requests need your approval.

These practices ensure a clean, maintainable codebase and simplify the integration of Fedora-specific modifications.

WOODPECKER CI

Fedora-forgejo fork uses Codeberg's instance of Woodpecker CI for running the test suite. Ticket for requesting a namespace. Might be necessary to open a ticket there for adding access rights for more users.

Access to our enrolled repos.

The pipeline runs on push to main, latest versioned branch and forgejo branch and for pull requests. Pull requests need a manual approval. It's also possible to add users to allowlist in the ci.codeberg.org/repos settings to avoid needing approval to run pipelines. This can be done through settings.

Changes introduced:

  • The content is in .woodpecker directory.
  • Content translated to woodpecker syntax.
  • Former workflow-composite helper actions are now in bash (apt-install-from.sh, build-backend.sh, setup-env.sh). setup-cache-go action dropped - we might add it as a woodpecker plugin.
  • Using golang:1.24-bookworm image and installing node dependencies instead of data.forgejo.org/oci/node:22-bookworm and installing go dependencies.