| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- - name: Create build folder
- ansible.builtin.file:
- path: "{{ app_build_target | dirname }}"
- state: directory
- mode: "0755"
- - name: Download source code
- ansible.builtin.unarchive:
- src: https://github.com/iapt-platform/mint/archive/{{ mint_version }}.zip
- dest: "{{ app_build_target | dirname }}"
- remote_src: true
- creates: "{{ app_build_target }}"
- - name: Upload dashboard-v4 dist
- ansible.posix.synchronize:
- src: "{{ playbook_dir }}/tmp/mint/dashboard-v4/dashboard/dist-{{ app_domain }}-{{ mint_version }}/"
- dest: "{{ app_build_target }}/dashboard-v4/dashboard/dist/"
- - name: Upload openai-proxy dist
- ansible.posix.synchronize:
- src: "{{ playbook_dir }}/tmp/mint/open-ai-server/dist/"
- dest: "{{ app_build_target }}/open-ai-server/dist/"
- - name: Upload shell.sh
- ansible.builtin.template:
- src: shell.sh.j2
- dest: "{{ app_build_target }}/scripts/shell.sh"
- mode: "0555"
- - name: Upload build.sh
- ansible.builtin.template:
- src: build.sh.j2
- dest: "{{ app_build_target }}/scripts/build.sh"
- mode: "0555"
- - name: Setup mint dependencies and build mint.tar.xz
- ansible.builtin.shell:
- cmd: "docker run --rm -it --hostname=mint --network host -v {{ app_build_target }}:{{ app_deploy_target }}:z {{ app_docker_image_name }} /bin/bash -c {{ app_deploy_target }}/scripts/build.sh"
- creates: "{{ app_build_target }}/tmp/{{ app_domain }}/mint-{{ mint_version }}.tar.xz"
- - name: Download mint.tar.xz
- ansible.posix.synchronize:
- src: "{{ app_build_target }}/tmp/{{ app_domain }}/mint-{{ mint_version }}.tar.xz"
- dest: "{{ playbook_dir }}/tmp/{{ app_domain }}-mint-{{ mint_version }}.tar.xz"
- mode: pull
|