mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-10 12:47:39 +01:00
Fix ma1sd self-building and make it not require gradle
This commit is contained in:
parent
998e9ce655
commit
0c048c7592
@ -57,22 +57,6 @@
|
|||||||
|
|
||||||
- when: "matrix_ma1sd_container_image_self_build | bool"
|
- when: "matrix_ma1sd_container_image_self_build | bool"
|
||||||
block:
|
block:
|
||||||
- name: Ensure gradle is installed for self-building (Debian)
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- gradle
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
when: (ansible_os_family == 'Debian')
|
|
||||||
|
|
||||||
- name: Ensure gradle is installed for self-building (RedHat)
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "Installing gradle on RedHat ({{ ansible_distribution }}) is currently not supported, so self-building ma1sd cannot happen at this time"
|
|
||||||
when: ansible_os_family == 'RedHat'
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/ensure_gradle_installed_archlinux.yml"
|
|
||||||
when: "ansible_distribution == 'Archlinux'"
|
|
||||||
|
|
||||||
- name: Ensure ma1sd repository is present on self-build
|
- name: Ensure ma1sd repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_ma1sd_container_image_self_build_repo }}"
|
repo: "{{ matrix_ma1sd_container_image_self_build_repo }}"
|
||||||
@ -83,27 +67,14 @@
|
|||||||
become_user: "{{ matrix_user_username }}"
|
become_user: "{{ matrix_user_username }}"
|
||||||
register: matrix_ma1sd_git_pull_results
|
register: matrix_ma1sd_git_pull_results
|
||||||
|
|
||||||
- name: Ensure ma1sd Docker image is built
|
- name: Ensure ma1sd container image is built
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: ./gradlew dockerBuild
|
cmd: |-
|
||||||
chdir: "{{ matrix_ma1sd_docker_src_files_path }}"
|
{{ devture_systemd_docker_base_host_command_docker }} buildx build
|
||||||
environment:
|
--tag={{ matrix_ma1sd_docker_image }}
|
||||||
DOCKER_BUILDKIT: 1
|
--file={{ matrix_ma1sd_docker_src_files_path }}/Dockerfile
|
||||||
|
{{ matrix_ma1sd_docker_src_files_path }}
|
||||||
changed_when: true
|
changed_when: true
|
||||||
when: matrix_ma1sd_git_pull_results.changed
|
|
||||||
|
|
||||||
- name: Ensure ma1sd Docker image is tagged correctly
|
|
||||||
community.docker.docker_image:
|
|
||||||
# The build script always tags the image with 2 tags:
|
|
||||||
# - based on the branch/version: e.g. `ma1uta/ma1sd:2.4.0` (when on `2.4.0`)
|
|
||||||
# or `ma1uta/ma1sd:2.4.0-19-ga71d32b` (when on a given commit for a pre-release)
|
|
||||||
# - generic one: `ma1uta/ma1sd:latest-dev`
|
|
||||||
#
|
|
||||||
# It's hard to predict the first one, so we'll use the latter.
|
|
||||||
name: "ma1uta/ma1sd:latest-dev"
|
|
||||||
repository: "{{ matrix_ma1sd_docker_image }}"
|
|
||||||
force_tag: true
|
|
||||||
source: local
|
|
||||||
|
|
||||||
- name: Ensure ma1sd config installed
|
- name: Ensure ma1sd config installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure gradle installed (Archlinux)
|
|
||||||
community.general.pacman:
|
|
||||||
name: gradle
|
|
||||||
state: present
|
|
Loading…
Reference in New Issue
Block a user