소스 검색

:wrench: use git short commit id

Jeremy Zheng 9 달 전
부모
커밋
a2eb7e0b07
4개의 변경된 파일20개의 추가작업 그리고 7개의 파일을 삭제
  1. 0 1
      deploy/.gitignore
  2. 1 0
      deploy/README.md
  3. 1 0
      deploy/mint.yml
  4. 18 6
      deploy/roles/mint-v2.1/tasks/main.yml

+ 0 - 1
deploy/.gitignore

@@ -2,6 +2,5 @@
 /python/
 /shared/
 /tmp/
-/roles/mint/files/dashboard/
 *.log
 *.xz

+ 1 - 0
deploy/README.md

@@ -23,6 +23,7 @@ peony -i clients/CLUSTER ping.yml
 peony -i clients/CLUSTER ec2.yml
 # setup redis cluster nodes
 peony -i clients/CLUSTER redis.yml -l redis
+# check the version by: git log --abbrev-commit
 peony -i clients/CLUSTER mint.yml --extra-vars "mint_version=xxx"
 ```
 

+ 1 - 0
deploy/mint.yml

@@ -9,6 +9,7 @@
     - fpm
     - task
     - fort
+    - ai_translate
   roles:
     - mint-v2.1
 

+ 18 - 6
deploy/roles/mint-v2.1/tasks/main.yml

@@ -6,12 +6,24 @@
     owner: "{{ ansible_user }}"
     mode: "0755"
 
-- name: Download source code
-  ansible.builtin.unarchive:
-    src: https://github.com/iapt-platform/mint/archive/{{ mint_version }}.zip
-    dest: "{{ app_deploy_target | dirname }}"
-    remote_src: true
-    creates: "{{ app_deploy_target }}"
+# - name: Download source code
+#   ansible.builtin.unarchive:
+#     src: https://github.com/iapt-platform/mint/archive/{{ mint_version }}.zip
+#     dest: "{{ app_deploy_target | dirname }}"
+#     remote_src: true
+#     creates: "{{ app_deploy_target }}"
+
+- name: Download source codes
+  ansible.builtin.git:
+    repo: "https://github.com/iapt-platform/mint.git"
+    dest: "{{ app_deploy_target | dirname }}/repo"
+
+- name: Clone to spec version
+  ansible.builtin.git:
+    repo: "{{ app_deploy_target | dirname }}/repo"
+    dest: "{{ app_deploy_target }}"
+    depth: 1
+    single_branch: true
 
 - name: Upload dashboard-v4 dist
   ansible.posix.synchronize: