1
0
Fork 0
hedy-docker-ansible/tasks/build-hedy.yml

36 lines
1,006 B
YAML

---
- name: Hedy build paths
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0700
owner: "{{ hedy_builder_username }}"
group: "{{ hedy_builder_groupname }}"
with_items:
- {path: "{{ hedy_docker_src_files_path }}"}
- name: Hedy build git repository
ansible.builtin.git:
repo: "{{ hedy_container_image_self_build_repo }}"
dest: "{{ hedy_docker_src_files_path }}"
version: "{{ hedy_container_image_self_build_version }}"
force: "yes"
register: hedy_git_pull_results
- name: Hedy build translations
command:
cmd: "pybabel compile -f -d translations"
chdir: "{{ hedy_docker_src_files_path }}"
#when: "hedy_git_pull_results.changed"
- name: Hedy build Docker image
community.docker.docker_image:
name: "{{ hedy_docker_image }}"
source: build
force_source: "{{ hedy_git_pull_results.changed }}"
build:
dockerfile: Dockerfile
path: "{{ hedy_docker_src_files_path }}"
pull: true
push: true