Skip to content
Extraits de code Groupes Projets
Valider 6d923abc rédigé par remi-filament's avatar remi-filament
Parcourir les fichiers

[enh] add pull of source image when rebuilding Odoo docker

parent efda2b21
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -5,6 +5,20 @@ ...@@ -5,6 +5,20 @@
files: whitelists.yaml files: whitelists.yaml
project_name: whitelists project_name: whitelists
- name: pull odoo docker ML image
docker_image:
name: lefilament/odoo:{{ odoo_version }}_ml
source: pull
force_source: yes
when: odoo_multilingual is defined and odoo_multilingual
- name: pull odoo docker image
docker_image:
name: lefilament/odoo:{{ odoo_version }}
source: pull
force_source: yes
when: odoo_multilingual is not defined or not odoo_multilingual
- name: build odoo_test docker - name: build odoo_test docker
docker_compose: docker_compose:
project_src: /home/docker/odootest/ project_src: /home/docker/odootest/
...@@ -73,3 +87,10 @@ ...@@ -73,3 +87,10 @@
project_src: /home/docker/odoo/ project_src: /home/docker/odoo/
remove_orphans: yes remove_orphans: yes
- name: remove intermediate image
docker_prune:
builder_cache: yes
images: yes
images_filters:
label: stage=builder
when: inventory_hostname not in groups['maintenance_contract']
...@@ -37,7 +37,10 @@ ...@@ -37,7 +37,10 @@
with_items: '{{ odoo_nonprod_instances | default([]) }}' with_items: '{{ odoo_nonprod_instances | default([]) }}'
loop_control: loop_control:
label: '{{ item.name }}' label: '{{ item.name }}'
notify: build {{ item.name }} docker notify:
- pull odoo docker ML image
- pull odoo docker image
- build {{ item.name }} docker
tags: odoo_nonprod tags: odoo_nonprod
- name: NONPROD copy update scripts to be run during build - name: NONPROD copy update scripts to be run during build
...@@ -50,7 +53,10 @@ ...@@ -50,7 +53,10 @@
with_items: '{{ odoo_nonprod_instances | default([]) }}' with_items: '{{ odoo_nonprod_instances | default([]) }}'
loop_control: loop_control:
label: '{{ item.name }}' label: '{{ item.name }}'
notify: build {{ item.name }} docker notify:
- pull odoo docker ML image
- pull odoo docker image
- build {{ item.name }} docker
tags: odoo_nonprod tags: odoo_nonprod
- name: NONPROD set repos.yaml variables from template - name: NONPROD set repos.yaml variables from template
...@@ -63,7 +69,10 @@ ...@@ -63,7 +69,10 @@
with_items: '{{ odoo_nonprod_instances | default([]) }}' with_items: '{{ odoo_nonprod_instances | default([]) }}'
loop_control: loop_control:
label: '{{ item.name }}' label: '{{ item.name }}'
notify: build {{ item.name }} docker notify:
- pull odoo docker ML image
- pull odoo docker image
- build {{ item.name }} docker
tags: odoo_nonprod tags: odoo_nonprod
- name: NONPROD set repos-addons.yaml variables from template - name: NONPROD set repos-addons.yaml variables from template
...@@ -76,7 +85,10 @@ ...@@ -76,7 +85,10 @@
with_items: '{{ odoo_nonprod_instances | default([]) }}' with_items: '{{ odoo_nonprod_instances | default([]) }}'
loop_control: loop_control:
label: '{{ item.name }}' label: '{{ item.name }}'
notify: build {{ item.name }} docker notify:
- pull odoo docker ML image
- pull odoo docker image
- build {{ item.name }} docker
tags: odoo_nonprod tags: odoo_nonprod
- name: NONPROD copy odoo.conf file - name: NONPROD copy odoo.conf file
...@@ -116,7 +128,10 @@ ...@@ -116,7 +128,10 @@
with_items: '{{ odoo_nonprod_instances | default([]) }}' with_items: '{{ odoo_nonprod_instances | default([]) }}'
loop_control: loop_control:
label: '{{ item.name }}' label: '{{ item.name }}'
notify: build {{ item.name }} docker notify:
- pull odoo docker ML image
- pull odoo docker image
- build {{ item.name }} docker
tags: odoo_nonprod tags: odoo_nonprod
- name: NONPROD copy test docker compose service - name: NONPROD copy test docker compose service
...@@ -162,7 +177,10 @@ ...@@ -162,7 +177,10 @@
group: root group: root
mode: '0644' mode: '0644'
when: odoo_nonprod_instances is not defined and odoo_prod is defined when: odoo_nonprod_instances is not defined and odoo_prod is defined
notify: build odoo docker prod notify:
- pull odoo docker ML image
- pull odoo docker image
- build odoo docker prod
tags: odoo_prod tags: odoo_prod
- name: PROD copy update scripts to be run during build - name: PROD copy update scripts to be run during build
...@@ -176,7 +194,10 @@ ...@@ -176,7 +194,10 @@
- fetch_repos - fetch_repos
- fetch_repos_addons - fetch_repos_addons
when: odoo_nonprod_instances is not defined and odoo_prod is defined when: odoo_nonprod_instances is not defined and odoo_prod is defined
notify: build odoo docker prod notify:
- pull odoo docker ML image
- pull odoo docker image
- build odoo docker prod
tags: odoo_prod tags: odoo_prod
- name: PROD set repos variables from template - name: PROD set repos variables from template
...@@ -189,7 +210,10 @@ ...@@ -189,7 +210,10 @@
vars: vars:
item: "{{ odoo_prod }}" item: "{{ odoo_prod }}"
when: odoo_nonprod_instances is not defined and odoo_prod is defined when: odoo_nonprod_instances is not defined and odoo_prod is defined
notify: build odoo docker prod notify:
- pull odoo docker ML image
- pull odoo docker image
- build odoo docker prod
tags: odoo_prod tags: odoo_prod
- name: PROD set repos-addons variables from template - name: PROD set repos-addons variables from template
...@@ -202,7 +226,10 @@ ...@@ -202,7 +226,10 @@
vars: vars:
item: "{{ odoo_prod }}" item: "{{ odoo_prod }}"
when: odoo_nonprod_instances is not defined and odoo_prod is defined when: odoo_nonprod_instances is not defined and odoo_prod is defined
notify: build odoo docker prod notify:
- pull odoo docker ML image
- pull odoo docker image
- build odoo docker prod
tags: odoo_prod tags: odoo_prod
- name: PROD copy odoo.conf file - name: PROD copy odoo.conf file
...@@ -213,7 +240,10 @@ ...@@ -213,7 +240,10 @@
group: root group: root
mode: '0600' mode: '0600'
when: odoo_nonprod_instances is not defined and odoo_prod is defined when: odoo_nonprod_instances is not defined and odoo_prod is defined
notify: build odoo docker prod notify:
- pull odoo docker ML image
- pull odoo docker image
- build odoo docker prod
tags: odoo_prod tags: odoo_prod
- name: PROD copy private ssh keys file - name: PROD copy private ssh keys file
...@@ -271,7 +301,7 @@ ...@@ -271,7 +301,7 @@
- name: Install necessary python modules - name: Install necessary python modules
pip: pip:
name: ['prettytable', 'cssselect', 'html2text', 'unidecode', 'python-dateutil', 'lxml', 'Pillow', 'Babel', 'pyyaml', 'requests'] name: ['prettytable', 'cssselect', 'html2text', 'unidecode', 'python-dateutil', 'lxml', 'Pillow', 'Babel', 'pyyaml', 'requests', 'pyOpenSSL']
executable: /usr/bin/pip3 executable: /usr/bin/pip3
state: latest state: latest
when: banking is defined and odoo_prod is defined when: banking is defined and odoo_prod is defined
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter