This commit is contained in:
thienqb123456
2025-03-04 10:06:53 +07:00
parent c4d166d418
commit f94804e277
3 changed files with 24 additions and 26 deletions
+6 -5
View File
@@ -1,4 +1,4 @@
# Tải artifact từ Nexus
# Tải artifact từ Nexus Repository
- name: Download artifact from Nexus
win_get_url:
url: "{{ nexus_url }}/{{ artifact_name }}"
@@ -18,9 +18,11 @@
debug:
var: download_status
- name: Check if the download was successful
debug:
msg: "Download successful: {{ download_status.msg }}"
# Lỗi khi tải artifact từ nexus thất bại
- name: Fail if download artifact from Nexus Repository fail
fail:
msg: "Download artifact from nexus fail"
when: download_status.status_code != 200
# Kiểm tra ở trên server đã tồn tại file vùa tải xuống không
- name: Check if the artifact file exists
@@ -35,7 +37,6 @@
debug:
var: file_status
# Giải nén artifact vào thư mục target
- name: Deploy to target environment
win_unzip: