|
|
|
### Overview
|
|
|
|
To create CI Reviews we use `ci-review-app` program command.
|
|
|
|
|
|
|
|
This application creates new odoo instance on docker and install all addons available in project with following exceptions:
|
|
|
|
- addons started with `theme_` are skipped, because Odoo does not allow to install more then one theme
|
|
|
|
|
|
|
|
### Configuration variables
|
|
|
|
This command use following environment variables for configuration:
|
|
|
|
- CI_REVIEW_SERVER_NAME - domain name to start review on. If not set, then will be automatically computed based on `CI
|
|
|
|
- CI_REVIEW_INSTALL_ADDONS - list of extra addons to be installed (separated by coma or space)
|
|
|
|
- CI_REVIEW_INSTALL_APT_DEPS - list of *apt* packages to be installed (separated by space)
|
|
|
|
- CI_REVIEW_MAIN_SERVICE - name of main docker service to be exposed to external world
|
|
|
|
|
|
|
|
### Commands
|
|
|
|
This command have following subcommands:
|
|
|
|
- `ci-review-app init` initialize review. if there was previous review running in selected environment, then it will be stopped and removed first, and then new review will be initialized.
|
|
|
|
- `ci-review-app start` start review.
|
|
|
|
- `ci-review-app dep <git url> [branch]` add addons from specified git repository to review container. These addons will not be installed automatically, but they will be available to be used as dependencies for project addons.
|
|
|
|
- `ci-review-app stop` stop running review. Usualy used in `stop_review` job to stop environment.
|
|
|
|
|
|
|
|
### Example
|
|
|
|
|
|
|
|
```yml
|
|
|
|
.deploy_review_definition: &deploy_review_definition
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
|
|
|
CI_REVIEW_INSTALL_APT_DEPS: "ffmpeg"
|
|
|
|
CI_REVIEW_INSTALL_ADDONS: "crnd_web_button_box_full_width"
|
|
|
|
before_script:
|
|
|
|
- ci-review-app init
|
|
|
|
- ci-review-app dep https://gitlab.crnd.pro/crnd/crnd-web "$SERIES_BRANCH"
|
|
|
|
script:
|
|
|
|
- ci-review-app start
|
|
|
|
tags:
|
|
|
|
- review-apps
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
deploy_review_dev:
|
|
|
|
<<: *deploy_review_definition
|
|
|
|
environment:
|
|
|
|
name: review/$CI_COMMIT_REF_NAME
|
|
|
|
url: http://$CI_ENVIRONMENT_SLUG-$CI_PROJECT_ID.ci3.crnd.pro
|
|
|
|
on_stop: stop_review_dev
|
|
|
|
only:
|
|
|
|
- /^11.0-.*$/ # only branches that started with '11.0-'
|
|
|
|
when: manual
|
|
|
|
|
|
|
|
stop_review_dev:
|
|
|
|
stage: deploy
|
|
|
|
environment:
|
|
|
|
name: review/$CI_COMMIT_REF_NAME
|
|
|
|
action: stop
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
script:
|
|
|
|
- ci-review-app stop
|
|
|
|
when: manual
|
|
|
|
tags:
|
|
|
|
- review-apps
|
|
|
|
- deploy
|
|
|
|
only:
|
|
|
|
- /^11.0-.*$/ # only branches that started with '11.0-'
|
|
|
|
``` |
|
|
|
\ No newline at end of file |