|
|
# Odoo Packager
|
|
|
|
|
|
Program that fetches Odoo addons from various sources and saves them in
|
|
|
single git repository. Designed to work as gitlab build tool.
|
|
|
|
|
|
For detailed documentation look at [Docker Image repo](https://gitlab.crnd.pro/crnd/docker/odoo-apps-packager)
|
|
|
|
|
|
## Docker image
|
|
|
|
|
|
- [Odoo Apps Packager](https://gitlab.crnd.pro/crnd/docker/odoo-apps-packager)
|
|
|
|
|
|
## Configuration format
|
|
|
|
|
|
The configuration file for packager have to be placed into the root of repository
|
|
|
and named `odoo-packager.yml`
|
|
|
|
|
|
This configuration file use [YAML](https://yaml.org/) syntax and have following format:
|
|
|
|
|
|
```yaml
|
|
|
|
|
|
// Example odoo-packager configuration
|
|
|
addons-list:
|
|
|
// Usualy contains list of addon names
|
|
|
- generic_condition
|
|
|
- generic_rule
|
|
|
- website_snippet_anchor
|
|
|
- website_legal_page
|
|
|
|
|
|
// In specific cases you can specify source to get addon from.
|
|
|
- name: crnd_web_diagram_fix
|
|
|
source: crnd-web
|
|
|
- name: website_logo
|
|
|
source: website_logo
|
|
|
- auth_saml
|
|
|
|
|
|
// List of git repositories to fetch addons from.
|
|
|
git-sources:
|
|
|
// Usually it is enough to specify repository url only
|
|
|
- url: "https://github.com/crnd-inc/generic-addons"
|
|
|
- url: "https://github.com/OCA/website"
|
|
|
|
|
|
// also we can specify name for repository,
|
|
|
// that could be used to reference this repository
|
|
|
// in addons-list section.
|
|
|
- url: "git@gitlab.crnd.pro:crnd/crnd-web"
|
|
|
name: "crnd-web"
|
|
|
|
|
|
// Also it is possible to specify branch to of repository to be clonned.
|
|
|
// It is possible to specify one repository multiple times with different branches.
|
|
|
// There is specific parametr 'no_search' which means that this repository
|
|
|
// will not take part in search of source for addon. It will be used as source
|
|
|
// only if it is manually specified as source for addon (in addons-list)
|
|
|
- url: "https://github.com/eslAmer/website"
|
|
|
branch: "12.0-mig-website_logo"
|
|
|
no_search: true
|
|
|
name: "website_logo"
|
|
|
|
|
|
// There are some shortcuts available.
|
|
|
// This is shortcut for OCA repositories located under github.com/OCA
|
|
|
// and internaly it will be converted to
|
|
|
// url: "https://github.com/OCA/server-auth"
|
|
|
- oca: server-auth
|
|
|
|
|
|
// There is one more shortcut available: 'github'.
|
|
|
// specification below will be automatically converted to
|
|
|
// url: "https://github.com/OCA/web"
|
|
|
- github: OCA/web
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Addon encription
|
|
|
|
|
|
Encription of addons is managed via environment variables.
|
|
|
|
|
|
To tell packager that addon `my_addon` have to be encrypted via [PyArmor](https://github.com/dashingsoft/pyarmor)
|
|
|
you have to specify following environment variable:
|
|
|
|
|
|
```
|
|
|
ARMOR_ADDON_my_addon = 1
|
|
|
```
|
|
|
|
|
|
As we can see, variable name consists of two parts separated by underscore (`_`):
|
|
|
1. `ARMOR_ADDON` which tells packager that some addon have to be encrypted
|
|
|
2. `my_addon` - name of addon that have to be encrypted.
|
|
|
|
|
|
Thus if you need to encrypt multiple addons, you have to specify one variable per addon.
|
|
|
|