From b0e984136f88f77b6a730578e4c4fef81347265a Mon Sep 17 00:00:00 2001 From: Matt Cengia Date: Fri, 17 Jul 2020 13:57:47 +1000 Subject: [PATCH] Fix issues building ma1sd Docker image The tag format used in the `ma1sd` repo have change. Versions no longer start with 'v', and when building for non-amd64, we also need to strip off the '-$arch' bit from the Docker image name. Further, when building the .jar file, `ma1sd` currently names the .jar based on the project's directory, which we call 'docker-src'. This means other parts of the `ma1sd` build can't find the .jar file. Remedy this by ensuring that the dir is called `docker-src/ma1sd`. --- roles/matrix-ma1sd/defaults/main.yml | 2 +- roles/matrix-ma1sd/tasks/setup_ma1sd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/matrix-ma1sd/defaults/main.yml b/roles/matrix-ma1sd/defaults/main.yml index 822cc942..8fa8662a 100644 --- a/roles/matrix-ma1sd/defaults/main.yml +++ b/roles/matrix-ma1sd/defaults/main.yml @@ -11,7 +11,7 @@ matrix_ma1sd_docker_image: "ma1uta/ma1sd:2.4.0-{{ matrix_ma1sd_architecture }}" matrix_ma1sd_docker_image_force_pull: "{{ matrix_ma1sd_docker_image.endswith(':latest') }}" matrix_ma1sd_base_path: "{{ matrix_base_data_path }}/ma1sd" -matrix_ma1sd_docker_src_files_path: "{{ matrix_ma1sd_base_path }}/docker-src" +matrix_ma1sd_docker_src_files_path: "{{ matrix_ma1sd_base_path }}/docker-src/ma1sd" matrix_ma1sd_config_path: "{{ matrix_ma1sd_base_path }}/config" matrix_ma1sd_data_path: "{{ matrix_ma1sd_base_path }}/data" diff --git a/roles/matrix-ma1sd/tasks/setup_ma1sd.yml b/roles/matrix-ma1sd/tasks/setup_ma1sd.yml index ee055afd..cef94a24 100644 --- a/roles/matrix-ma1sd/tasks/setup_ma1sd.yml +++ b/roles/matrix-ma1sd/tasks/setup_ma1sd.yml @@ -54,7 +54,7 @@ git: repo: https://github.com/ma1uta/ma1sd.git dest: "{{ matrix_ma1sd_docker_src_files_path }}" - version: "v{{ matrix_ma1sd_docker_image.split(':')[1] }}" + version: "{{ matrix_ma1sd_docker_image.split(':')[1].split('-')[0] }}" force: "yes" - name: Ensure ma1sd Docker image is built