Promote PI to Main
- Make sure the taken revision has passed the continuous builds and tests in erp/devel/pi.
- Specially, make sure the taken revision has passed the database consistency test.
- Clone the repositories
$ hg clone https://code.openbravo.com/erp/devel/main main $ hg clone https://code.openbravo.com/erp/devel/pi pi $ cd /path/to/main/
- Edit the .hgrc file to have the push credentials (some thing like sed -i "s/code.openbravo.com/user:email@example.com )
- Pull the changesets from pi to main
$ hg pull -u /path/to/pi
- Check for hg pull results/output for heads and conflicts on conflicts
Do hg merge Do hg resolve Commit the changes to repo using hg commit -m "merge from pi"
- Push the changeset to main "code.openbravo.com"
- Generate an e-mail to the RM and OB-devel MLs
How Integrated to builds.openbravo.com
Main aim is to archive automatic promotion of "good" revisions to main. what do we mean with "good"? We measure this as a set of builds and tests that are run successfully on a specific code revision on the pre-integration repo. When this happens then all the code up to that revision is selected to be promoted to the stable repository main.
Criteria for the process
- Logical order: if an incremental job fails a full build will not be triggered. Because the full job is polling for changes from int-3, but as the job failed no push to int-3 has happened.
- The revision tested by the last job has been tested in all the jobs. So we have the guarantee that it has passed all the tests. And we can push it to main.
- The short-time jobs do not have to wait for the long time jobs. Not all the revisions tested by job 1 are tested by job 2. But the opposite is always true. All the jobs tested by 2 have been tested by 1.
- The model does not depend on a specific Continuous Integration software.
This is the proposed workflow in the *integration* stage:
- Each job/test will have its own local repo (int-1, int-2 .. int-<N>)
- Have top/first job that will
- Get the last stable revision of pi from pi related jobs
- Pull the changeset from pi into int till the last successful revision/changeset.
- Clone int locally in the system as int-1
- Execute on other test below in sequence, such that each test/build on success will push the changeset to next local repo int-x
Example: 1. Incremental build for PostgreSQL (erp_devel_int-inc-pgsql). * This job polls from int-1. If there are changes it runs the job. * If the job is successful, it pushes the changesets to a new repository, int-2. 2. Incremental build for Oracle (erp_devel_int-inc-oracle). * This job polls from int-2. If there are changes it runs the job. * If the job is successful, it pushes the changesets to a new repository, int-3. 3. Full build for PostgreSQL (erp_devel_int-full-pgsql). * This job polls from int-3. If there are changes it runs the job. * If the job is successful, it pushes the changesets to a new repository, int-4. (...) N. Sanity test upgrade from 2.40 (erp_devel_int-sanity-tests) * This job polls from int-X. If there are changes it runs the job.
- If the last job is successful, it pushes the changesets to *main*
|Job titile||Sequence||Tied to||Pull changes from||Update repo||Estimate (hh.mm.ss)|
|erp_pi_to_main_promotion_check||1||master||https://code.openbravo.com/erp/devel/pi||https://code.openbravo.com/erp/devel/int and int-1(local)||00.10.00|
|erp_devel_int-sanity-tests||11||master||Refers to workspace of full build (/srv/hudson/jobs/erp_devel_int-full-pgsql/workspace)||push from int-10 to int-11||00.00.05|
|erp_devel_main_obx||14||master||http://code.openbravo.com/erp/devel/main||copy the obx file to http://builds.openbravo.com/erp||00.05.00|
Above jobs that trigger test/build with respect to pi main integration can be seen here
Subject : 2.50MPX ready for QA, Notifying about:
- The merge is done, from changeset xxxxxxxxxxxx of erp/devel/pi to erp/devel/main
- It's build/compilation status.
- The database consistency status.
Note: we can use hudson-cli for the same. eg: java -jar hudson-cli.jar -s http://builds[dot]openbravo[dot]com mail