Thienvv -
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user