Add deployment-time build tooling for custom docker images
This commit is contained in:
parent
b0612af979
commit
8bfb365dfd
@ -23,6 +23,14 @@
|
|||||||
- import_playbook: initialize.yml
|
- import_playbook: initialize.yml
|
||||||
|
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
hosts: virtualization
|
||||||
|
vars_files:
|
||||||
|
- vars/applications.yml
|
||||||
|
tasks:
|
||||||
|
- import_tasks: tasks/docker/build.yml
|
||||||
|
|
||||||
|
|
||||||
- name: Configure datastore
|
- name: Configure datastore
|
||||||
hosts: jupiter
|
hosts: jupiter
|
||||||
vars_files:
|
vars_files:
|
||||||
|
23
tasks/docker/build.yml
Normal file
23
tasks/docker/build.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
- name: Clone repositories
|
||||||
|
when: item.value.build is defined
|
||||||
|
git:
|
||||||
|
dest: /tmp/{{ item.key }}
|
||||||
|
repo: "{{ item.value.build.repository }}"
|
||||||
|
version: "{{ item.value.build.version }}"
|
||||||
|
loop: "{{ omni_compose_apps | dict2items }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.key }}"
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
when: item.value.build is defined
|
||||||
|
docker_image:
|
||||||
|
source: build
|
||||||
|
name: "{{ item.key }}"
|
||||||
|
tag: "{{ item.value.build.version }}"
|
||||||
|
build:
|
||||||
|
path: /tmp/{{ item.key }}
|
||||||
|
rm: true
|
||||||
|
loop: "{{ omni_compose_apps | dict2items }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.key }}"
|
@ -85,6 +85,9 @@ omni_compose_apps:
|
|||||||
versions:
|
versions:
|
||||||
default: "5.12"
|
default: "5.12"
|
||||||
scipio:
|
scipio:
|
||||||
|
build:
|
||||||
|
repository: git@github.com:tjyork/Scipio.git
|
||||||
|
version: 0.2.0
|
||||||
datastore: /appdata/scipio
|
datastore: /appdata/scipio
|
||||||
account:
|
account:
|
||||||
name: mech_scipio
|
name: mech_scipio
|
||||||
|
Reference in New Issue
Block a user