소스 검색

Merge pull request #1183 from Toorero/mautrix-telegram-selfbuild-fix

Fixed mautrix-telegram selfbuild not working on non amd64 platforms
pull/1197/head
Slavi Pantaleev 4 년 전
committed by GitHub
부모
커밋
25e6eb27ab
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
3개의 변경된 파일31개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -0
      group_vars/matrix_servers
  2. +6
    -0
      roles/matrix-bridge-mautrix-telegram/defaults/main.yml
  3. +23
    -1
      roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml

+ 2
- 0
group_vars/matrix_servers 파일 보기

@@ -393,6 +393,8 @@ matrix_mautrix_telegram_enabled: false


# Images are multi-arch (amd64 and arm64, but not arm32). # Images are multi-arch (amd64 and arm64, but not arm32).
matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
matrix_telegram_lottieconverter_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
matrix_telegram_lottieconverter_container_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"


matrix_mautrix_telegram_systemd_required_services_list: | matrix_mautrix_telegram_systemd_required_services_list: |
{{ {{


+ 6
- 0
roles/matrix-bridge-mautrix-telegram/defaults/main.yml 파일 보기

@@ -3,6 +3,12 @@


matrix_mautrix_telegram_enabled: true matrix_mautrix_telegram_enabled: true


matrix_telegram_lottieconverter_container_self_build: false
matrix_telegram_lottieconverter_container_self_build_mask_arch: false
matrix_telegram_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git"
matrix_telegram_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src"
matrix_telegram_lottieconverter_docker_image: "dock.mau.dev/tulir/lottieconverter:alpine-3.14" # needs to be ajusted according to FROM clause of Dockerfile of mautrix-telegram

matrix_mautrix_telegram_container_self_build: false matrix_mautrix_telegram_container_self_build: false
matrix_mautrix_telegram_docker_repo: "https://mau.dev/tulir/mautrix-telegram.git" matrix_mautrix_telegram_docker_repo: "https://mau.dev/tulir/mautrix-telegram.git"
matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src" matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src"


+ 23
- 1
roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml 파일 보기

@@ -56,6 +56,26 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_telegram_docker_image_force_pull }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_telegram_docker_image_force_pull }}"
when: "not matrix_mautrix_telegram_container_self_build|bool" when: "not matrix_mautrix_telegram_container_self_build|bool"


- name: Ensure lottieconverter is present when self-building
git:
repo: "{{ matrix_telegram_lottieconverter_docker_repo }}"
dest: "{{ matrix_telegram_lottieconverter_docker_src_files_path }}"
force: "yes"
register: matrix_telegram_lottieconverter_git_pull_results
when: "matrix_telegram_lottieconverter_container_self_build|bool and matrix_mautrix_telegram_container_self_build|bool"

- name: Ensure lottieconverter Docker image is built
docker_image:
name: "{{ matrix_telegram_lottieconverter_docker_image }}"
source: build
force_source: "{{ matrix_telegram_lottieconverter_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_telegram_lottieconverter_git_pull_results.changed }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_telegram_lottieconverter_docker_src_files_path }}"
pull: yes
when: "matrix_telegram_lottieconverter_container_self_build|bool and matrix_telegram_lottieconverter_git_pull_results.changed and matrix_mautrix_telegram_container_self_build|bool"

- name: Ensure matrix-mautrix-telegram repository is present when self-building - name: Ensure matrix-mautrix-telegram repository is present when self-building
git: git:
repo: "{{ matrix_mautrix_telegram_docker_repo }}" repo: "{{ matrix_mautrix_telegram_docker_repo }}"
@@ -73,7 +93,9 @@
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" path: "{{ matrix_mautrix_telegram_docker_src_files_path }}"
pull: yes
pull: "{{ not matrix_telegram_lottieconverter_container_self_build_mask_arch|bool }}"
args:
TARGETARCH: ""
when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed" when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed"


- name: Check if an old database file already exists - name: Check if an old database file already exists


불러오는 중...
취소
저장