Thienvv -

This commit is contained in:
thienqb123456
2024-12-23 00:23:40 +07:00
parent fbefb3750d
commit 267a77cc08
+22 -5
View File
@@ -13,11 +13,28 @@
nexus_username: "{{ nexus_username }}" nexus_username: "{{ nexus_username }}"
nexus_password: "{{ nexus_password }}" nexus_password: "{{ nexus_password }}"
# Kiểm tra xem artifact đã được tải thành công chưa # Debug download_status
- name: Verify artifact download - name: Debug download_status
fail: debug:
msg: "Failed to download artifact from Nexus." var: download_status
when: download_status is failed
- 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 # Giải nén artifact vào thư mục target
- name: Deploy Backend to target environment - name: Deploy Backend to target environment