|
1 | | - |
2 | | -.. _odoosh-gettingstarted-builds: |
3 | | - |
4 | 1 | ====== |
5 | 2 | Builds |
6 | 3 | ====== |
7 | 4 |
|
| 5 | +In Odoo.sh, a build is a database loaded by an Odoo server (`odoo/odoo |
| 6 | +<https://github.com/odoo/odoo>`_ and `odoo/enterprise <https://github.com/odoo/enterprise>`_) |
| 7 | +running on a specific revision of your project repository in a containerized environment. Its |
| 8 | +purpose is to test the proper behavior of the server, the database, and the features associated with |
| 9 | +that revision. |
| 10 | + |
| 11 | +.. _odoo-sh/builds/overview: |
| 12 | + |
8 | 13 | Overview |
9 | 14 | ======== |
10 | 15 |
|
11 | | -In Odoo.sh, a build is considered as a database loaded by an Odoo server |
12 | | -(`odoo/odoo <https://github.com/odoo/odoo>`_ & `odoo/enterprise |
13 | | -<https://github.com/odoo/enterprise>`_) running on a specific revision of your project repository in |
14 | | -a containerized environment. Its purpose is to test the well-behavior of the server, the database |
15 | | -and the features with this revision. |
16 | | - |
17 | | -.. image:: builds/interface-builds.png |
18 | | - :align: center |
| 16 | +.. image:: builds/builds-overview.png |
| 17 | + :alt: Overiew of the builds |
19 | 18 |
|
20 | | -In this view, a row represents a branch, and a cell of a row represents a build of this branch. |
| 19 | +In the :guilabel:`Builds` overview, a row represents a branch, and a cell within that row represents |
| 20 | +a build of that branch. |
21 | 21 |
|
22 | | -Most of the time, builds are created following pushes on your Github repository branches. |
23 | | -They can be created as well when you do other operations, |
24 | | -such as importing a database on Odoo.sh or asking a rebuild for a branch in your project. |
| 22 | +Most builds are created after pushes to your GitHub repository branches. They can also be created |
| 23 | +through other operations, such as importing a database on Odoo.sh or requesting a rebuild for a |
| 24 | +branch in your project. |
25 | 25 |
|
26 | | -A build is considered successful if no errors or warnings come up during its creation. |
27 | | -A successful build is highlighted in green. |
| 26 | +Builds can have three possible statuses: |
28 | 27 |
|
29 | | -A build is considered failed if errors come up during its creation. |
30 | | -A failed build is highlighted in red. |
| 28 | +- A build is considered **successful** if no errors or warnings occur during its creation. |
| 29 | + Successful builds are highlighted in **green**. |
| 30 | +- A build is considered **almost successful** if warnings occur, but there are no errors. Almost |
| 31 | + successful builds are highlighted in **yellow**. |
| 32 | +- A build is considered **failed** if errors occur during its creation. Failed builds are |
| 33 | + highlighted in **red**. |
31 | 34 |
|
32 | | -If warnings come up during the creation, but there are no errors, the build is considered almost |
33 | | -successful. It is highlighted in yellow to notify the developer warnings were raised. |
| 35 | +.. note:: |
| 36 | + Builds do not always create a database from scratch. For instance, when pushing a change on the |
| 37 | + production branch, the created build starts the server with your new revision and tries to load |
| 38 | + the current production database on it. |
34 | 39 |
|
35 | | -Builds do not always create a database from scratch. For instance, when pushing a change on the |
36 | | -production branch, the build created just starts the server with your new revision and tries to load |
37 | | -the current production database on it. If no errors come up, the build is considered successful, and |
38 | | -otherwise failed. |
| 40 | +.. _odoo-sh/builds/stages: |
39 | 41 |
|
40 | 42 | Stages |
41 | 43 | ====== |
42 | 44 |
|
| 45 | +.. _odoo-sh/builds/stages/production: |
| 46 | + |
43 | 47 | Production |
44 | 48 | ---------- |
45 | 49 |
|
46 | | -The first build of a production branch creates a database from scratch. |
47 | | -If this build is successful, this database is considered as the production database of your project. |
| 50 | +The first build of a production branch creates a database from scratch. If this build is successful, |
| 51 | +this database will become the production database of your project. |
48 | 52 |
|
49 | | -From then, pushes on the production branch will create new builds that attempt to load the database |
50 | | -using a server running with the new revision. |
| 53 | +From then on, pushes to the production branch will create new builds that attempt to load the |
| 54 | +database using a server running the new revision. |
51 | 55 |
|
52 | | -If the build is successful, or has warnings but no errors, the production database will now run with |
53 | | -this build, along with the revision associated to this build. |
| 56 | +If the build is successful or almost successful, the production database will run with this build |
| 57 | +and its associated revision. |
54 | 58 |
|
55 | | -If the build fails to load or update the database, then the previous successful build is re-used to |
56 | | -load the database, and therefore the database will run using a server running with the previous |
57 | | -successful revision. |
| 59 | +If the build fails to load or update the database, the previous successful build is reused to load |
| 60 | +the database. In that case, the database continues to run using the previous successful revision. |
| 61 | + |
| 62 | +.. note:: |
| 63 | + The build used to run the production database is always the first in the builds list. If a build |
| 64 | + fails, it is placed after the build currently running the production database. |
| 65 | + |
| 66 | +.. _odoo-sh/builds/stages/staging: |
58 | 67 |
|
59 | | -The build used to run the production database is always the first of the builds list. If a build |
60 | | -fails, it is put after the build currently running the production database. |
61 | 68 |
|
62 | 69 | Staging |
63 | 70 | ------- |
64 | 71 |
|
65 | | -Staging builds duplicate the production database, |
66 | | -and try to load this duplicate with the revisions of the staging branches. |
| 72 | +Staging builds duplicate the production database and attempt to load this copy using the revisions |
| 73 | +of the staging branches. |
| 74 | + |
| 75 | +Each time you push a new revision to a staging branch, the resulting build uses a fresh copy of the |
| 76 | +production database. Databases are not reused between builds of the same branch. This ensures that: |
67 | 77 |
|
68 | | -Each time you push a new revision on a staging branch, the build created uses a new copy of the |
69 | | -production database. The databases are not re-used between builds of the same branch. This ensures: |
| 78 | +- Staging builds use databases that closely match the current production state, so your tests are |
| 79 | + not performed on outdated data. |
| 80 | +- You can freely experiment within a staging database. When you want to start over with a new copy |
| 81 | + of the production database, you can request a rebuild. |
70 | 82 |
|
71 | | -* staging builds use databases that are close to what the production looks like, so you do not make |
72 | | - your tests with outdated data, |
| 83 | +However, this also means that if you make configuration changes in a staging database and do not |
| 84 | +apply them in production, those changes will not be present in the next build of the same staging |
| 85 | +branch. |
73 | 86 |
|
74 | | -* you can play around as much as you want in the same staging database, and you can then ask for a |
75 | | - rebuild when you want to restart with a new copy of the production. |
| 87 | +.. _odoo-sh/builds/stages/development: |
76 | 88 |
|
77 | | -Nevertheless, this means that if you make configuration changes in staging databases and do not |
78 | | -apply them in the production, they will not be passed on the next build of the same staging branch. |
79 | 89 |
|
80 | 90 | Development |
81 | 91 | ----------- |
82 | 92 |
|
83 | | -Development builds create new databases, load the demo data and run the unit tests. |
| 93 | +Development builds create new databases, load the demo data, and run the unit tests. |
84 | 94 |
|
85 | | -A build will be considered failed and highlighted in red if tests fail during the installation, |
86 | | -as they are meant to raise errors if something wrong occurs. |
| 95 | +A build will be considered failed if tests fail during installation, as they are designed to raise |
| 96 | +errors when something is wrong. |
87 | 97 |
|
88 | | -If all tests pass, and there is no error, the build will be considered successful. |
| 98 | +If all tests pass and no errors occur, the build is considered successful. |
89 | 99 |
|
90 | | -According to the list of modules to install and test, a development build can take up to 1 hour to |
91 | | -be ready. This is due to the large number of tests set in the default Odoo modules suite. |
| 100 | +.. note:: |
| 101 | + Depending on the list of modules to install and test, a development build can take up to one hour |
| 102 | + to be ready. This is due to the large number of tests included in the default Odoo module suite. |
| 103 | + |
| 104 | +.. _odoo-sh/builds/stages/features: |
92 | 105 |
|
93 | 106 | Features |
94 | 107 | ======== |
95 | 108 |
|
96 | | -The production branch will always appear first, and then the other branches are ordered by last |
97 | | -build created. You can filter out the branches. |
98 | | - |
99 | | -.. image:: builds/interface-builds-branches.png |
100 | | - :align: center |
| 109 | +The production branch always appears first. Other branches are ordered by the time of their last |
| 110 | +created build. The stage highlighted in purple corresponds to the stage selected in the |
| 111 | +:guilabel:`Branches` menu. |
101 | 112 |
|
102 | | -For each branch, you can access the last build's database using the *Connect* link and jump to the |
103 | | -branch code using the *Github* link. For other branches than the production, you can create a new |
104 | | -build which will use the latest revision of the branch using the link *rebuild*. This last link is |
105 | | -not available when there is already a build in progress for the branch. |
| 113 | +.. tip:: |
| 114 | + You can filter branches using the search bar. |
106 | 115 |
|
107 | | -.. image:: builds/interface-builds-build.png |
108 | | - :align: center |
| 116 | +.. image:: builds/branches-menu.png |
| 117 | + :alt: The branches menu |
109 | 118 |
|
110 | | -For each build, you can access the revision changes using the button with the Github icon. You can |
111 | | -access the build's database as the administrator using the *Connect* button. Also, you can access |
112 | | -the database with another user using the *Connect as* button, in the dropdown menu of the *Connect* |
113 | | -button. |
| 119 | +For each branch, you can: |
114 | 120 |
|
115 | | -.. _odoosh-gettingstarted-builds-download-dump: |
| 121 | +- Access the latest build's database by clicking :guilabel:`Connect`. |
| 122 | +- Jump to the branch's code by clicking :guilabel:`Github`. |
| 123 | +- Create a new build by clicking :guilabel:`Rebuild`. It uses the latest revision of the branch (it |
| 124 | + is not available if a build is already in progress for that branch). |
116 | 125 |
|
117 | | -.. image:: builds/interface-builds-build-dropdown.png |
118 | | - :align: center |
| 126 | +For each build, you can: |
119 | 127 |
|
120 | | -.. _odoosh-gettingstarted-builds-dropdown-menu: |
| 128 | +- View the revision changes by clicking the :icon:`fa-github` (:guilabel:`GitHub`) icon. |
| 129 | +- Access the build's database as the administrator by clicking :guilabel:`Connect` or as another |
| 130 | + user by clicking the :icon:`fa-caret-down` (:guilabel:`More Actions`) button next to |
| 131 | + :guilabel:`Connect` and selecting :guilabel:`Connect as`. |
| 132 | +- Access the same tools as in the branches view by clicking the :icon:`fa-caret-down` |
| 133 | + (:guilabel:`More Actions`) button next to :guilabel:`Connect` and selecting :guilabel:`Logs`, |
| 134 | + :guilabel:`Web Shell`, :guilabel:`Editor`, :guilabel:`Outgoing e-mails` (for the staging and |
| 135 | + development stages), :guilabel:`Monitoring`, and :guilabel:`Download DB dump` (for the production |
| 136 | + and staging stages). |
121 | 137 |
|
122 | | -In the dropdown menu of the build, you can access the same features than in :ref:`the branches view |
123 | | -<odoo-sh/branches/tabs>`: *Logs*, *Web Shell*, *Editor*, *Outgoing e-mails*. You also |
124 | | -have the possibility to *Download a dump* of the build's database. |
| 138 | +.. image:: builds/builds-options.png |
| 139 | + :alt: A build's options |
0 commit comments