This document was written to help developers interested in contributing to ERP5.
It shows how to fork ERP5, test changes, and create merge requests.
Table of Contents
To develop on ERP5 you will need your own instance. The easiest way to get
an ERP5 instance is following the steps outlined in how
to request an ERP5 instance on SlapOS. If you already have an instance, make
sure it's up to date using how
to update business templates on an existing instance.
ERP5 is hosted on Gitlab. Go to the ERP5
repository and login/create an account. Then fork ERP5 to your own account.
Access your webrunner. Go to your Services tab and locate the
Slappart[x] instance Zope is running on.
From SlapOS you should know that a Webrunner installs a single software (ERP5 in
our case), and deploys a single instance of this software - the ERP5 you are working with.
The services shows all services required to run ERP5 - from MariaDB to Apache.
Open the Terminal and pwd to verify you are on your runner.
There are two important locations to know:
There are two options to get a "working copy" of ERP5 to which you can commit to:
ln -s software/[hash]/parts/erp5/ instance/srv/erp5_shared/erp5/
Go to your source folder and add your fork as a second remote using:
git remote add [NAME] https://lab.nexedi.com/[your_gitlab_name]/erp5.git
This will allow you to update your ERP5 fork from the original source while
pushing changes to your fork, so you can create merge requests.
Follow the steps in how to commit from ERP5,
starting from Tell ERP5 About The Path To Bt5s. This should set up your ERP5 instance to
commit onto your ERP5 fork.
Don't forget to create a branch for your modifications.
Make commits without pushing, so you can push to either remote as necessary. Be
sure to add tests for any changes you make.
Once you have changes ready for testing on erp5-master, use one of the
for_testrunner_[i] branches on the erp5 repository. Pick one
currently not being used and verify with the last committer you can hijack
the branch. Then:
git push origin --force [your_branch_name]:for_testrunner_[i]
Alternatively, you can define your own test suite (instructions provided here).
Monitor the test results in the test_result_module. If tests are
passing and there are no regressions, continue and create a merge request.
Once your tests are passing, push your changes to your fork:
git push my_fork [your_branch_name]:[your_branch_name]
On Gitlab you can now create a merge request against erp5:master. Well done! Thanks for contributing.