Add hookshot self build for arm64 and amd64
This commit is contained in:
@ -2,26 +2,50 @@
|
||||
|
||||
- import_tasks: "{{ role_path }}/../matrix-base/tasks/util/ensure_openssl_installed.yml"
|
||||
|
||||
- name: Ensure hookshot paths exist
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- { path: "{{ matrix_hookshot_base_path }}", when: true }
|
||||
- { path: "{{ matrix_hookshot_docker_src_files_path }}", when: "{{ matrix_hookshot_container_image_self_build }}" }
|
||||
when: item.when|bool
|
||||
|
||||
- name: Ensure hookshot image is pulled
|
||||
docker_image:
|
||||
name: "{{ matrix_hookshot_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_hookshot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_hookshot_docker_image_force_pull }}"
|
||||
when: not matrix_hookshot_container_image_self_build
|
||||
register: result
|
||||
retries: "{{ matrix_container_retries_count }}"
|
||||
delay: "{{ matrix_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure hookshot paths exist
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- "{{ matrix_hookshot_base_path }}"
|
||||
- name: Ensure hookshot repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_hookshot_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_hookshot_docker_src_files_path }}"
|
||||
version: "{{ matrix_hookshot_container_image_self_build_branch }}"
|
||||
force: "yes"
|
||||
register: matrix_hookshot_git_pull_results
|
||||
when: "matrix_hookshot_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure hookshot Docker image is built
|
||||
docker_image:
|
||||
name: "{{ matrix_hookshot_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_hookshot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
||||
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_hookshot_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_hookshot_docker_src_files_path }}"
|
||||
pull: yes
|
||||
when: "matrix_hookshot_container_image_self_build|bool"
|
||||
|
||||
- name: Check if hookshot passkey exists
|
||||
stat:
|
||||
|
Reference in New Issue
Block a user