Sfoglia il codice sorgente

Rework Self Build Logic to integrate review feedback.

pull/5187/head
Catalan Lover 1 mese fa
parent
commit
6b2d7ddf2f
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 99A263BABA26C9D9
2 ha cambiato i file con 10 aggiunte e 6 eliminazioni
  1. +5
    -3
      roles/custom/matrix-appservice-draupnir-for-all/tasks/setup_install.yml
  2. +5
    -3
      roles/custom/matrix-bot-draupnir/tasks/setup_install.yml

+ 5
- 3
roles/custom/matrix-appservice-draupnir-for-all/tasks/setup_install.yml Vedi File

@@ -48,14 +48,16 @@

- name: Ensure Draupnir Docker image is built
# Using docker_image_build with BuildKit for modern, efficient builds.
# docker_image_build automatically rebuilds when the Dockerfile or build context changes.
# The git_pull_results will show if the source was updated above.
# Rebuild when the git checkout advanced to a new commit; otherwise keep the build idempotent.
# Technically the idempotency of rebuilds is more that if a build has already been executed for that name:tag
# then we wont rebuild while in idempotent mode even if git moved. Thats what the force rebuild logic is for.
community.docker.docker_image_build:
name: "{{ matrix_appservice_draupnir_for_all_container_image }}"
dockerfile: Dockerfile
path: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}"
pull: true
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool and matrix_appservice_draupnir_for_all_git_pull_results.changed"
rebuild: "{{ 'always' if matrix_appservice_draupnir_for_all_git_pull_results.changed | bool else 'never' }}"
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool"
register: matrix_appservice_draupnir_for_all_container_image_build_result

- name: Ensure matrix-appservice-draupnir-for-all appservice config installed


+ 5
- 3
roles/custom/matrix-bot-draupnir/tasks/setup_install.yml Vedi File

@@ -60,14 +60,16 @@

- name: Ensure Draupnir Docker image is built
# Using docker_image_build with BuildKit for modern, efficient builds.
# docker_image_build automatically rebuilds when the Dockerfile or build context changes.
# The git_pull_results will show if the source was updated above.
# Rebuild when the git checkout advanced to a new commit; otherwise keep the build idempotent.
# Technically the idempotency of rebuilds is more that if a build has already been executed for that name:tag
# then we wont rebuild while in idempotent mode even if git moved. Thats what the force rebuild logic is for.
community.docker.docker_image_build:
name: "{{ matrix_bot_draupnir_container_image }}"
dockerfile: Dockerfile
path: "{{ matrix_bot_draupnir_container_src_files_path }}"
pull: true
when: "matrix_bot_draupnir_container_image_self_build | bool and matrix_bot_draupnir_git_pull_results.changed"
rebuild: "{{ 'always' if matrix_bot_draupnir_git_pull_results.changed | bool else 'never' }}"
when: "matrix_bot_draupnir_container_image_self_build | bool"
register: matrix_bot_draupnir_container_image_build_result

- name: Ensure matrix-bot-draupnir config installed


Caricamento…
Annulla
Salva