Version file added dynamically (workaround as uv does not have this feature yet)
Tag container image with playbook Importable module with python -m treetrail
This commit is contained in:
parent
2d0b788728
commit
1693662e75
11 changed files with 66 additions and 29 deletions
14
build.yaml
14
build.yaml
|
@ -1,8 +1,7 @@
|
|||
- name: Build containers
|
||||
- name: Build containers images
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
force: false
|
||||
force_rm: false
|
||||
cache: false
|
||||
repository: tiptop:5000
|
||||
|
@ -31,9 +30,15 @@
|
|||
push_args:
|
||||
dest: "{{ repository }}/treetrail-backend-deps"
|
||||
|
||||
- name: Get the version from git
|
||||
command: git describe --dirty --tags
|
||||
register: version
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Build the backend container image
|
||||
containers.podman.podman_image:
|
||||
name: treetrail-backend
|
||||
name: "treetrail-backend:{{ version.stdout }}"
|
||||
state: build
|
||||
force: true
|
||||
path: "{{ playbook_dir }}"
|
||||
|
@ -42,6 +47,7 @@
|
|||
force_rm: "{{ force_rm }}"
|
||||
cache: "{{ cache }}"
|
||||
file: Containerfile
|
||||
extra_args: "--build-arg APP_VERSION={{ version.stdout }}"
|
||||
push: true
|
||||
push_args:
|
||||
dest: "{{ repository }}/treetrail-backend"
|
||||
dest: "{{ repository }}/treetrail-backend:{{ version.stdout }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue