v3 #1

Open
thienvv wants to merge 69 commits from v3 into main
Showing only changes of commit 267a77cc08 - Show all commits
+22 -5
View File
@@ -13,11 +13,28 @@
nexus_username: "{{ nexus_username }}"
nexus_password: "{{ nexus_password }}"
# Kiểm tra xem artifact đã được tải thành công chưa
- name: Verify artifact download
fail:
msg: "Failed to download artifact from Nexus."
when: download_status is failed
# Debug download_status
- name: Debug download_status
debug:
var: download_status
- name: Check if the download was successful
debug:
msg: "Download successful: {{ download_status.downloaded }}"
# 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
stat:
path: "{{ temp_dir }}\\{{ artifact_name }}"
register: file_status
changed_when: false
failed_when: false
# Debug file_status
- name: Output file status
debug:
msg: "Artifact downloaded: {{ file_status.stat.exists }}"
# Giải nén artifact vào thư mục target
- name: Deploy Backend to target environment